l=list(open('/dev/fd/0')) print''.join(sorted(l,key=l.index))