#include <bits stdc++.h="">
using namespace std;

int combine(int a, int b) {
int times = 1;
while (times <= b)
times *= 10;
return a*times + b;
} 
bool cmp(int a,int b)
{
int p=combine(a,b);
int q=combine(b,a);
return (p>q)? 1:0;
}
int main()
{
int n;
cin>>n;
int a[n];
for(int i=0;i<n;i++) {="" cin="">>a[i];
}