import List\x0d (%)=replicate\x0d v=reverse\x0d a#b=a++[b]\x0d g l=m!0:transpose(v(k!(2*m+k)):k%(k%' ')#(k!m))#v(m!(m+k))\x0d where\x0d m!n=take m(drop n(l++repeat ' '))\x0d m=(length l+7)`div`4\x0d k=m-2\x0d main=interact(unlines.g)
Note that non-ascii characters in the above source code will be escaped (such as \x9f).