Outline by nn

m=(l=System.in.readLines())*.size().max()
(p=0.&println)S='#'*(m+4)
[a=' '*m,*l,a].any{p"# ${it.padRight(m)} #"}
p S

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page