while 1: l=['']*99 for i in input():l[[i in j for j in l].index(0)]+=i print('/'.join(l).strip('/'))