import std.stdio;void main(){int n,s,m;for(m=s=getchar%8;~m||++n<1<<(m=s);)putchar=m--?".#"[n>>m&1]:10;}