Back and forth by recursive

i=0
r=1
while 1:
\x09for w in raw_input().split():l=len(w);print" "*(i+r/2*l)+w[::r];i+=r*l;r=-r

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

download

return top