while 1: l=['']*99 for i in input():l[[i in j for j in l].index(0)]+=i print('/'.join(l).strip('/'))
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page