for(;Q=readline(R=[]);print(R.join('/')))for(F in Q){for(G=0;~(P=R[G]||'').indexOf(T=Q[F]);)++G;R[G]=P+T}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page