for(;l=readline(o='');print(o))for(i=0;c=l[i];o+=n>2?c+'-'+l[i+=n-1]:c,i++)for(n=0;l[f='charCodeAt'](i+n)-c[f]()==n;)n++
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page