// iostream is too mainstream
#include <cstdio>
// bitch please
#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <list>
#include <cmath>
#include <iomanip>
#define dibs reserve
#define OVER9000 1034567890
#define ALL_THE(CAKE,LIE) for(auto LIE =CAKE.begin(); LIE != CAKE.end(); LIE++)
#define tisic 47
#define soclose 1e-6
#define chocolate win
#define pi 3.14159265359
// so much chocolate
#define patkan 9
#define ff first
#define ss second
#define abs(x) ((x < 0)?-(x):x)
#define uint unsigned int
using namespace std;
// mylittledoge
int main() {
cin.sync_with_stdio(0);
cin.tie(0);
string s;
while(cin >> s) {
if(s == "END") return 0;
int L =51;
vector<string> H(L);
for(int i =0; i < L*L; i++) H[i/L] +=' ';
for(int i =0; i < L; i++) H[0][i] =H[i][0] =H[L-1][i] =H[i][L-1] ='X';
for(int i =0; i < L; i +=10) H[0][i] =H[i][0] =H[L-1][i] =H[i][L-1] ='@';
H[2][L/2-1] ='1';
H[2][L/2+1] ='2';
H[L/2][2] ='9';
H[L/2][L-3] ='3';
H[L-3][L/2] ='6';
H[L/2][L/2] ='*';
int m;
if(s[1] == ':') m =10*(s[2]-'0')+(s[3]-'0')+60*(s[0]-'0');
else m =(10*(s[3]-'0')+(s[4]-'0')+60*(s[1]-'0')+600*(s[0]-'0'))%(60*12);
double angH =m*0.5, angM =(m%60)*6;
int px =1, py =-1;
if(angH > 90 && angH < 180+soclose) py =1;
if(angH >= 180-soclose && angH <= 270+soclose) py =1, px =-1;
if(angH >= 270-soclose) px =-1, py =-1;
double angA =min(360-angH,angH);
if(angH > 90 && angH < 270) angA =abs(angH-180);
if(angA < 45)
for(int i =3; i < L/2; i++) {
double x =(L/2-i)*tan(angA*pi/180);
H[L/2+(L/2-i)*py][L/2+int(round(x))*px] ='o';}
else
for(int j =L/2+1; j < L-3; j++) {
double y =(j-L/2)/tan(angA*pi/180);
H[L/2+int(round(y))*py][L/2+(j-L/2)*px] ='o';}
for(int i =1; i < L-1; i++) for(int j =1; j < L-1; j++) if(H[i][j] == 'o') {
char c =H[i][j+1],c2 =H[i][j-1];
if(c == 'o' || c == '|' || c == '-' || c == '/' || c == '\\' || c == '*')
if(c2 == 'o' || c2 == '|' || c2 == '-' || c2 == '/' || c2 == '\\' || c2 == '*') {
H[i][j] ='-';
continue;}
c =H[i-1][j],c2 =H[i+1][j];
if(c == 'o' || c == '|' || c == '-' || c == '/' || c == '\\' || c == '*')
if(c2 == 'o' || c2 == '|' || c2 == '-' || c2 == '/' || c2 == '\\' || c2 == '*') {
H[i][j] ='|';
continue;}
c =H[i-1][j-1],c2 =H[i+1][j+1];
if(c == 'o' || c == '|' || c == '-' || c == '/' || c == '\\' || c == '*')
if(c2 == 'o' || c2 == '|' || c2 == '-' || c2 == '/' || c2 == '\\' || c2 == '*') {
H[i][j] ='\\';
continue;}
c =H[i-1][j+1],c2 =H[i+1][j-1];
if(c == 'o' || c == '|' || c == '-' || c == '/' || c == '\\' || c == '*')
if(c2 == 'o' || c2 == '|' || c2 == '-' || c2 == '/' || c2 == '\\' || c2 == '*') {
H[i][j] ='/';
continue;}
}
for(int i =3; i < L-3; i++) for(int j =3; j < L-3; j++)
if(H[i][j] != ' ' && (i-L/2)*(i-L/2)+(j-L/2)*(j-L/2) > 15*15) H[i][j] =' ';
px =1, py =-1;
if(angM > 90 && angM < 180+soclose) py =1;
if(angM >= 180-soclose && angM <= 270+soclose) py =1, px =-1;
if(angM >= 270-soclose) px =-1, py =-1;
angA =min(360-angM,angM);
if(angM > 90 && angM < 270) angA =abs(angM-180);
if(angA < 45)
for(int i =3; i < L/2; i++) {
double x =(L/2-i)*tan(angA*pi/180);
H[L/2+(L/2-i)*py][L/2+int(round(x))*px] ='o'+1;}
else
for(int j =L/2+1; j < L-3; j++) {
double y =(j-L/2)/tan(angA*pi/180);
H[L/2+int(round(y))*py][L/2+(j-L/2)*px] ='o'+1;}
for(int i =1; i < L-1; i++) for(int j =1; j < L-1; j++) if(H[i][j] == 'o'+1) {
char c =H[i][j+1],c2 =H[i][j-1];
if(c == 'o'+1 || c == '|'+1 || c == '-'+1 || c == '/'+1 || c == '\\'+1 || c == '*')
if(c2 == 'o'+1 || c2 == '|'+1 || c2 == '-'+1 || c2 == '/'+1 || c2 == '\\'+1 || c2 == '*') {
H[i][j] ='-'+1;
continue;}
c =H[i-1][j],c2 =H[i+1][j];
if(c == 'o'+1 || c == '|'+1 || c == '-'+1 || c == '/'+1 || c == '\\'+1 || c == '*')
if(c2 == 'o'+1 || c2 == '|'+1 || c2 == '-'+1 || c2 == '/'+1 || c2 == '\\'+1 || c2 == '*') {
H[i][j] ='|'+1;
continue;}
c =H[i-1][j-1],c2 =H[i+1][j+1];
if(c == 'o'+1 || c == '|'+1 || c == '-'+1 || c == '/'+1 || c == '\\'+1 || c == '*')
if(c2 == 'o'+1 || c2 == '|'+1 || c2 == '-'+1 || c2 == '/'+1 || c2 == '\\'+1 || c2 == '*') {
H[i][j] ='\\'+1;
continue;}
c =H[i-1][j+1],c2 =H[i+1][j-1];
if(c == 'o'+1 || c == '|'+1 || c == '-'+1 || c == '/'+1 || c == '\\'+1 || c == '*')
if(c2 == 'o'+1 || c2 == '|'+1 || c2 == '-'+1 || c2 == '/'+1 || c2 == '\\'+1 || c2 == '*') {
H[i][j] ='/'+1;
continue;}
}
for(int i =3; i < L-3; i++) for(int j =3; j < L-3; j++) {
if(H[i][j] != ' ' && (i-L/2)*(i-L/2)+(j-L/2)*(j-L/2) > 21*21) H[i][j] =' ';
if(H[i][j] == 'o'+1) H[i][j]--;
if(H[i][j] == '|'+1) H[i][j]--;
if(H[i][j] == '-'+1) H[i][j]--;
if(H[i][j] == '/'+1) H[i][j]--;
if(H[i][j] == '\\'+1) H[i][j]--;}
for(int i =0; i < L; i++) cout << H[i] << "\n";
cout << "\n";}
return 0;}
// look at my code
// my code is amazing