var s,t=readLine while(s!=t)println{t=s s=s.replaceAll("""(/.\\)|(/)\||\|(\\)""","$1$2$2$3$3") t}