n=gets.to_i s=" " f=s+" ##"*n r="#"+" #"*(n-1) puts f,s+r,r,r,r,s+r,f