#include<iostream>
#include<vector>
#include<string>
#include <algorithm>
using namespace std;
bool cmp_by_value(pair<int, int> lhs, pair<int, int>rhs)
{
return lhs.second > rhs.second;
}
int main()
{
vector<int> vec;
string str;
getline(cin,str);
while(true)
{
if(str.find_first_of(' ')!=string::npos)
{
string strTmp=str.substr(0, str.find_first_of(' '));
vec.push_back(atoi(strTmp.c_str()));
str = str.substr(str.find_first_of(' ')+1, str.size());
}
else
{
vec.push_back(atoi(str.c_str()));
break;
}
}
vector<int> v=vec;
vector<int>::iterator iter = v.begin();
while(iter != v.end()){
if(iter != find(v.begin(),iter,*iter)){
iter = v.erase(iter);
continue;
}
iter++;
}
vector<pair<int,int> >new_vec;
for (int i=0;i<v.size();i++)
{
new_vec.push_back(make_pair<int,int>(v[i],count(vec.begin(),vec.end(),v[i])));
}
sort(new_vec.begin(), new_vec.end(), cmp_by_value);
for (int i = 0; i != new_vec.size(); ++i)
{
int count=new_vec[i].second;
for (int j=0;j<count;j++)
{
cout<<new_vec[i].first<<" ";
}
}
cout<<endl;
return 0;
}