#include #include using namespace std; FILE *f,*g; int main() { int n,cop; f=fopen("input.in","r"); g=fopen("output.out","w"); fscanf(f,"%d ",&n); cop=0; while(n>0) { cop=cop*10+n%10; n/=10; } while(cop>0) { if((cop%10-1==cop/10%10)||(cop%10+1==cop/10%10)) { fprintf(g,"%d-",cop%10); cop/=10; } else { fprintf(g,"%d",cop%10); cop/=10; } } return 0; }