#include #include #define MAX 1000000 char r[10][MAX]; int main(void) { char b; int bit, temp, tail[10] = { 0 }; for (int i = 0; i < 10; i++) { r[i][0] = '\0'; } while (1) { scanf("%c", &b); if (b == '\n') break; r[b - 0x30][tail[b - 0x30]] = b; tail[b - 0x30]++; } for (int i = 9; i >= 0; i--) { r[i][tail[i]] = '\0'; printf("%s", r[i]); } printf("\n"); return 0; }