#include <iostream>
#include <fstream>
using namespace std;
ifstream fin("numere.in");
ofstream fout("nr.txt");
int main()
{
int x;
int aparitii[10] = { 0 };
while (fin >> x)
{
while (x)
{
aparitii[x % 10]++;
x /= 10;
}
}
for (int i = 9; i >= 0; i--)
{
while (aparitii[i])
{
fout << i;
aparitii[i]--;
}
}
return 0;
}