L=len\x0d R=raw_input\x0d a=[R()]\x0d _=L(a[0])\x0d while _>1-L(a):\x0d \x09try:i=R();_=max(L(i)-L(a),_);a+=[i]\x0d \x09except:R=0\x0d \x09_-=1;print' '*abs(_)+'___'.join([(l+'_'*99)[_+i]for i,l in enumerate(a)if _+i>=0]).rstrip('_').replace('_',' ')
Note that non-ascii characters in the above source code will be escaped (such as \x9f).