char *t=" .#\n";main(a){for(;~scanf("%1x",&a);printf("%c%c",t[a/4],t[a&3]));}