while 1: s={};i=l=0 for c in raw_input():i-=c>"(";s[i]=s.get(i,"").ljust(l)+c;i+=c<")";l+=1 for _ in s:print s[_]
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page