#include <iostream>
#include <string>
using namespace std;
int main(void)
{
string number;
int arr[10] = { 0, };
cin >> number;
for (int i = 0; i < number.length(); i++)
arr[number[i] - '0']++;
for (int i = 9; i >= 0; i--)
for (int j = 0; j < arr[i]; j++)
cout << i;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKHZvaWQpCnsKCXN0cmluZyBudW1iZXI7CglpbnQgYXJyWzEwXSA9IHsgMCwgfTsKCWNpbiA+PiBudW1iZXI7CgoJZm9yIChpbnQgaSA9IDA7IGkgPCBudW1iZXIubGVuZ3RoKCk7IGkrKykKCQlhcnJbbnVtYmVyW2ldIC0gJzAnXSsrOwoKCWZvciAoaW50IGkgPSA5OyBpID49IDA7IGktLSkKCQlmb3IgKGludCBqID0gMDsgaiA8IGFycltpXTsgaisrKQoJCQljb3V0IDw8IGk7CiAgICAKCXJldHVybiAwOwp9