$a=($i=<>)*3;$r=' 'x$b.' ##'x--$a." ",$t.=$t=' 'x$b.'# 'x$a."# ",$_=$b?"$r$t$_$t$r":"$r$t"x$i.$r,$b+=3 while$a-->$i;print