#include #include #include #include char b[17][34] = { "+---+---+---+---+---+---+---+---+", "|...|:::|...|:::|...|:::|...|:::|", "+---+---+---+---+---+---+---+---+", "|:::|...|:::|...|:::|...|:::|...|", "+---+---+---+---+---+---+---+---+", "|...|:::|...|:::|...|:::|...|:::|", "+---+---+---+---+---+---+---+---+", "|:::|...|:::|...|:::|...|:::|...|", "+---+---+---+---+---+---+---+---+", "|...|:::|...|:::|...|:::|...|:::|", "+---+---+---+---+---+---+---+---+", "|:::|...|:::|...|:::|...|:::|...|", "+---+---+---+---+---+---+---+---+", "|...|:::|...|:::|...|:::|...|:::|", "+---+---+---+---+---+---+---+---+", "|:::|...|:::|...|:::|...|:::|...|", "+---+---+---+---+---+---+---+---+", }; int main() { char buf[1002]; int i,x,y; char c,d,e,*s; fgets(buf,1000,stdin); s = buf + 7; while (1) { c = *s++; if (!isalnum(c)) break; if (isupper(c)) { d = *s++; } else { d = c; c = 'P'; } e = *s++; x = (int)((d - 'a'))*4 + 2; y = (int)(7-(e - '1'))*2 + 1; b[y][x] = c; c = *s++; if (c != ',') break; } fgets(buf,1000,stdin); s = buf + 7; while (1) { c = *s++; if (!isalnum(c)) break; if (isupper(c)) { d = *s++; c = tolower(c); } else { d = c; c = 'p'; } e = *s++; x = (int)((d - 'a'))*4 + 2; y = (int)(7-(e - '1'))*2 + 1; b[y][x] = c; c = *s++; if (c != ',') break; } for (i = 0; i < 17; i++) puts(b[i]); return 0; }