n=input() i=t=2-3*n while-t>=i:j=i+n&1;o=n-abs(i)>>1;o*=o/n*3;exec"print(' '*o+' ## # '[j::2]*20)[:j-3*t-o];"*-~j;i+=1