c,d;char*p,a[99];main(i){for(gets(a);i&&~puts(p=a);)for(d=i=0;*p;(d=*p)/93*c&&(i=*p=~c?47:92),++p)c=d%2-(*(p+1)==92);}