#include <iostream>
#include <fstream>
using namespace std;
unsigned v[10];
int main()
{
ifstream fin ("numere.txt");
unsigned long n; int i;
while (fin>>n)
{
while (n)
{
v[n%10]++;
n/=10;
}
}
for (i=9;i>-1;i--)
{
if (v[i]!=0)
{
while (v[i]>0)
{
cout<<i;
v[i]--;
}
}
}
fin.close ();
return 0;
}