using c=System.Console;class h{static void Main(){int a;while(0<(a=c.In.Read())){a="0123456789abcdef".IndexOf((char)a);c.Write("{0}{1}"," .#\n"[a>>2]," .#\n"[a&3]);}}}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).