#include <iostream>
#include <string>
using namespace std ;
string str [21] , ans ;
int main () {
int n ;
cin >> n ;
for ( int i = 1 ; i <= n ; i ++ ) cin >> str[i] ;
for ( int i = n ; i >= 1 ; i -- ) {
for ( int j = 1 ; j <= i ; j ++ ) {
if ( str[j] < str[j+1] ) swap ( str[j] , str[j+1] ) ;
}
}
for ( int i = 1 ; i <= n ; i ++ ) ans += str[i] ;
cout << ans ;
return 0 ;
}