Outline by twobit

x=id(1)%11
y=[29,50,19][x%4]
q='#'*y," "
for l in q+eval(x*'" "+raw_input(),')+q[::-1]:print"#%s#"%l.ljust(y)

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return top