n=gets.to_i l="\n" s=" " f=s+(" ##"*n) r=("# "*n).rstrip+l puts f+l+s+r+r*3+s+r+f