n=scan("stdin");a=c(" ",rep(" ##",n));b=c(rep("# ",n-1),"# ");cat(a," ",b,b,b,b," ",b,a,sep="")