prefix to postfix by leonid

s=[]
while 1:
 for x in raw_input()[::-2]:k=ord(x)/6&2;s[:k]=' '.join(s[:k]+[x]),
 print s[0]

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

download

return top