#include #include #include using namespace std; int main() { unordered_map cnt; cnt['9'] = 0; cnt['8'] = 0; cnt['7'] = 0; cnt['6'] = 0; cnt['5'] = 0; cnt['4'] = 0; cnt['3'] = 0; cnt['2'] = 0; cnt['1'] = 0; cnt['0'] = 0; string n; cin >> n; for (auto itr = cnt.begin(); itr != cnt.end(); ++itr) { for (int j = 0, size = n.size(); j < size; ++j) { if (itr->first == n[j]) itr->second++; } } for (auto itr = cnt.begin(); itr != cnt.end(); ++itr) { for (int j = 0; j < itr->second; ++j) { cout << itr->first; } } return 0; }