p=print r=io.read l=r()w="#"b=w..(" "):rep(("2 "):byte(#l%5))..w a=w:rep(#b)p(a)p(b)while""do p("# "..l..b:sub(#l+3))l=r()or p(a,p(b))end