from os.path import* while 1:exec("print(normpath(input()"+".translate('/.. '*24))"*2)