sort by first occurrence by niisaka

import os
a=os.read(0,1e5).split('\n')
print'\n'.join(sorted(a,key=a.index))

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

download

return top