s;n;p;main(c){for(;~c;p=c)c=getchar(),c+~p?n=p&&!printf(n>1?"%c-%c":"%c%c"+2*!n,s,p),s=c:n++;}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page