n=3*$1-2{for(;i<=3*n;){p=int((i2*n?i+1-2*n:0)/3) k=i++%3&&1 for(;j<3*(n-p)+k;j++)printf j<3*p||(j%3?k:!k)?FS:"#" print j=_}}