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