stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include "bits/stdc++.h"

using namespace std;

typedef long long ll;

typedef pair<int, int> pii;

typedef pair<ll, ll> pll;

const int INF = 1e9;

const ll LINF = 1e18;

inline ll gcd(ll a, ll b) { return b ? gcd(b, a%b) : a; }

inline ll lcm(ll a, ll b) { return a / gcd(a, b)*b; }

template<class S,class T> ostream& operator << (ostream& out,const pair<S,T>& o){ out << "(" << o.first << "," << o.second << ")"; return out; }

template<class T> ostream& operator << (ostream& out,const vector<T> V){ for(int i = 0; i < V.size(); i++){ out << V[i]; if(i!=V.size()-1) out << " ";} return out; }

template<class T> ostream& operator << (ostream& out,const vector<vector<T> > Mat){ for(int i = 0; i < Mat.size(); i++) { if(i != 0) out << endl; out << Mat[i];} return out; }

template<class S,class T> ostream& operator << (ostream& out,const map<S,T> mp){ out << "{ "; for(auto it = mp.begin(); it != mp.end(); it++){ out << it->first << ":" << it->second; if(mp.size()-1 != distance(mp.begin(),it)) out << ", "; } out << " }"; return out; }



/*

 <url:>

 問題文============================================================

 =================================================================

 解説=============================================================

 ================================================================

 */

int main(void) {

    cin.tie(0); ios_base::sync_with_stdio(false);

    int N,L; cin >> N >> L;

    vector<string> S(N); for(auto& in:S) cin >> in;

    sort(S.begin(),S.end());

    for(auto s:S) cout << s; cout << endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.343426831431261x):
#include<stdio.h>

#include<string.h>

char str[101][101];

char k[101];

int main()

{

	int i,j,m,n;

	scanf("%d %d",&m,&n);

	for(i=0 ; i<m ; i++)

	{

		scanf("%s",str[i]);

	}

	for(j=0 ; j<m ; j++)

		for(i=0 ; i<(m-1) ; i++)

		{

			if (strcmp(str[i],str[i+1])>0)

			{

				strcpy(k,str[i]);

				strcpy(str[i],str[i+1]);

				strcpy(str[i+1],k);

			}

		}

		for(i=0 ; i<m ; i++)

		{

        	printf("%s",str[i]);

		}

		return 0;

}
// Slower C++ solution:
#include<cstdio>

#include<cstring>

#include<iostream>

#include<algorithm>

#define ll long long

#define Di 3.1415926

#include<math.h>

#include<string>

#include<stack>

#define INF 0x3f3f3f3f

using namespace std;

ll  gcd(ll a,ll b)

{

    return a%b? gcd(b,a%b):b;

}

struct Node

{

    int t;

    char a[102];

}s[102];

bool cmp(Node a,Node b)

{

    return strcmp(a.a,b.a)<0;

}

int main()

{    int m,n,i,j;

     cin>>m>>n;

     for(i=0;i<m;i++)

     {

         cin>>s[i].a;

         s[i].t=i+1;

     }

     sort(s,s+m,cmp);

   /*  for(i=0;i<m-1;i++)

     {

         for(j=0;j<m-1-i;j++)

         {

             if(strcmp(s[i].a,s[j].a))

             {

                 int t=s[i].t;

                 s[i].t=s[j].t;

                 s[j].t=t;

             }

         }

     }*/

    // sort(s,s+m,cmp);

     for(i=0;i<m;i++)

     {

         cout<<s[i].a;

     }

     cout<<endl;



 return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.223384372285159x):
#include<stdio.h>

#include<string.h>

char str[101][101];

char k[101];

int main()

{

	int i,j,m,n;

	scanf("%d %d",&m,&n);

	for(i=0 ; i<m ; i++)

	{

		scanf("%s",str[i]);

	}

	for(j=0 ; j<m ; j++)

		for(i=0 ; i<(m-1) ; i++)

		{

			if (strcmp(str[i],str[i+1])>0)

			{

				strcpy(k,str[i]);

				strcpy(str[i],str[i+1]);

				strcpy(str[i+1],k);

			}

		}

		for(i=0 ; i<m ; i++)

		{

        	printf("%s",str[i]);

		}

		return 0;

}
// Slower C++ solution:
//#include<bits/stdc++.h>

#include<cstdio>

#include<cstdlib>

#include<cstring>

#include<cmath>

#include<iostream>

#include<algorithm>

#include<queue>

#include<vector>

#include<stdio.h>

#include<stack>

using namespace std;

string q[100001];

bool qaq(string x,string y)

{

	return x<y;

}

int main()

{

	int a,b;

	cin>>a>>b;

	for(int i=1;i<=a;i++)

		cin>>q[i];

	sort(q+1,q+a+1,qaq);

	for(int i=1;i<=a;i++)	

		cout<<q[i];

	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 4.341708832545631x):
#include<bits/stdc++.h>

using namespace std;

int n,l;

string s[105];

int main()

{

    cin>>n>>l;

    for(int i=0;i<n;i++)

    {

        cin>>s[i];

    }

    sort(s,s+n);

    for(int i=0;i<n;i++)

    cout<<s[i];

    return 0;

}
// Slower C++ solution:
//#include<bits/stdc++.h>

#include<cstdio>

#include<cstdlib>

#include<cstring>

#include<cmath>

#include<iostream>

#include<algorithm>

#include<queue>

#include<vector>

#include<stdio.h>

#include<stack>

using namespace std;

string q[100001];

bool qaq(string x,string y)

{

	return x<y;

}

int main()

{

	int a,b;

	cin>>a>>b;

	for(int i=1;i<=a;i++)

		cin>>q[i];

	sort(q+1,q+a+1,qaq);

	for(int i=1;i<=a;i++)	

		cout<<q[i];

	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 4.3421440296071365x):
#include<iostream>

#include<cstdio>

#include<algorithm>

using namespace std;

int main()

{

	int n,l;

	cin>>n>>l;

	string a[n+1];

	for(int i=1;i<=n;i++)

		cin>>a[i];

	sort(a+1,a+n+1);

	for(int i=1;i<=n;i++)

		cout<<a[i];

	return 0;

}
// Slower C++ solution:
//#include<bits/stdc++.h>

#include<cstdio>

#include<cstdlib>

#include<cstring>

#include<cmath>

#include<iostream>

#include<algorithm>

#include<queue>

#include<vector>

#include<stdio.h>

#include<stack>

using namespace std;

string q[100001];

bool qaq(string x,string y)

{

	return x<y;

}

int main()

{

	int a,b;

	cin>>a>>b;

	for(int i=1;i<=a;i++)

		cin>>q[i];

	sort(q+1,q+a+1,qaq);

	for(int i=1;i<=a;i++)	

		cout<<q[i];

	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 4.341743007726224x):
#include<iostream>

#include<cstring>

#include<string>

#include<algorithm>

using namespace std;

int main(){

	int n,m,i;

	cin>>n>>m;

	string s[n];

	for(i=0;i<n;i++)

	   cin>>s[i];

	sort(s,s+n);

	for(i=0;i<n;i++)

	   cout<<s[i];

    cout<<'\n';

}
// Slower C++ solution:
//#include<bits/stdc++.h>

#include<cstdio>

#include<cstdlib>

#include<cstring>

#include<cmath>

#include<iostream>

#include<algorithm>

#include<queue>

#include<vector>

#include<stdio.h>

#include<stack>

using namespace std;

string q[100001];

bool qaq(string x,string y)

{

	return x<y;

}

int main()

{

	int a,b;

	cin>>a>>b;

	for(int i=1;i<=a;i++)

		cin>>q[i];

	sort(q+1,q+a+1,qaq);

	for(int i=1;i<=a;i++)	

		cout<<q[i];

	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 4.331822516635358x):
#include<bits/stdc++.h>

using namespace std;

string askiii[101];

int main(){

	int n,i;

    scanf("%d%*d",&n);

    for(i=0;i<n;i++)

        cin>>askiii[i];

    sort(askiii,askiii+n);

    for(i=0;i<n;i++)

        cout<<askiii[i];

    return 0;

}
// Slower C++ solution:
//#include<bits/stdc++.h>

#include<cstdio>

#include<cstdlib>

#include<cstring>

#include<cmath>

#include<iostream>

#include<algorithm>

#include<queue>

#include<vector>

#include<stdio.h>

#include<stack>

using namespace std;

string q[100001];

bool qaq(string x,string y)

{

	return x<y;

}

int main()

{

	int a,b;

	cin>>a>>b;

	for(int i=1;i<=a;i++)

		cin>>q[i];

	sort(q+1,q+a+1,qaq);

	for(int i=1;i<=a;i++)	

		cout<<q[i];

	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 4.327602343969539x):
#include<bits/stdc++.h>

using namespace std ;

int n , l ;

string a[105] ;



int main()

{

	

	cin >> n >> l ;

	for ( int i = 0 ; i < n ; i++ )

	{

		cin >> a[i] ;

	}

	sort( a , a + n ) ;

	for ( int i = 0 ; i < n ; i++ )

	{

		cout << a[i] ;

	}

	cout << endl ;

	

	return 0 ;

	

}
// Slower C++ solution:
//#include<bits/stdc++.h>

#include<cstdio>

#include<cstdlib>

#include<cstring>

#include<cmath>

#include<iostream>

#include<algorithm>

#include<queue>

#include<vector>

#include<stdio.h>

#include<stack>

using namespace std;

string q[100001];

bool qaq(string x,string y)

{

	return x<y;

}

int main()

{

	int a,b;

	cin>>a>>b;

	for(int i=1;i<=a;i++)

		cin>>q[i];

	sort(q+1,q+a+1,qaq);

	for(int i=1;i<=a;i++)	

		cout<<q[i];

	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 4.332697578538139x):
#include<algorithm>

#include<iostream>

#include<cstring>

#include<cstdio>

#include<cmath>

using namespace std;

int n,l;

string a[101];

int main()

{

	scanf("%d%d",&n,&l);

	for(int i=1;i<=n;i++)

	{

		cin>>a[i];

	}

	sort(a+1,a+n+1);

	for(int i=1;i<=n;i++)

	{

		cout<<a[i];

	}

	return 0;

}
// Slower C++ solution:
//#include<bits/stdc++.h>

#include<cstdio>

#include<cstdlib>

#include<cstring>

#include<cmath>

#include<iostream>

#include<algorithm>

#include<queue>

#include<vector>

#include<stdio.h>

#include<stack>

using namespace std;

string q[100001];

bool qaq(string x,string y)

{

	return x<y;

}

int main()

{

	int a,b;

	cin>>a>>b;

	for(int i=1;i<=a;i++)

		cin>>q[i];

	sort(q+1,q+a+1,qaq);

	for(int i=1;i<=a;i++)	

		cout<<q[i];

	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 4.377056722389234x):
#include<iostream>

#include<fstream>

#include<algorithm>

#include<cstdio>

#include<cmath>

#include<string>

#include<cstring>

using namespace std;

int n,m;

string st[110];

int main()

{

	cin>>n>>m;

	for(int i=1;i<=n;i++)

		cin>>st[i];

	sort(st+1,st+1+n);

	for(int i=1;i<=n;i++)

		cout<<st[i];

	return 0;

}
// Slower C++ solution:
//#include<bits/stdc++.h>

#include<cstdio>

#include<cstdlib>

#include<cstring>

#include<cmath>

#include<iostream>

#include<algorithm>

#include<queue>

#include<vector>

#include<stdio.h>

#include<stack>

using namespace std;

string q[100001];

bool qaq(string x,string y)

{

	return x<y;

}

int main()

{

	int a,b;

	cin>>a>>b;

	for(int i=1;i<=a;i++)

		cin>>q[i];

	sort(q+1,q+a+1,qaq);

	for(int i=1;i<=a;i++)	

		cout<<q[i];

	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 4.328834423640686x):
#include <iostream>

#include <bits/stdc++.h>

using namespace std;

string s[101];

int main()

{

    int n,l;

    cin>>n>>l;

    for(int i=1;i<=n;i++)

        cin>>s[i];

    sort(s,s+n+1);

    for(int i=1;i<=n;i++)

    	cout<<s[i];

    cout<<endl;

    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

#define INF 100001

using namespace std;

inline int read()

{

	register int number_read=0,if_ok_read=1;

	char ch_read=getchar();

	while(ch_read<'0'||ch_read>'9')

	{

		if(ch_read=='-')

			if_ok_read=-1;

		ch_read=getchar();

	}

	while(ch_read>='0'&&ch_read<='9')

	{

		number_read=number_read*10+ch_read-'0';

		ch_read=getchar();

	}

	return number_read*if_ok_read;

}

inline void write(register int x_write)

{

    if(x_write<0)

	{

    	putchar('-');

		x_write=-x_write;

	}

    if(x_write>9)

		write(x_write/10);

    putchar(x_write%10+'0');

    return ;

}

int main()

{

	//freopen(".in","r",stdin);

	//freopen(".out","w",stdout);

	int n=read(),l=read() ;

	string s[INF];

	for(int i=0;i<n;i++)

		cin>>s[i];

	sort(s,s+n);

	for(int i=0;i<n;i++)

		cout<<s[i];

	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 4.353398669464552x):
#include <iostream>

#include <bits/stdc++.h>

using namespace std;

string s[101];

int main()

{

    int n,l;

    cin>>n>>l;

    for(int i=1;i<=n;i++)

        cin>>s[i];

    sort(s,s+n+1);

    for(int i=1;i<=n;i++)

    	cout<<s[i];

    cout<<endl;

    return 0;

}
// Slower C++ solution:
#include<iostream>

#include<cstring>

using namespace std;

string st[10000];

int n,m;

int main()

{

	cin>>n>>m;

	for (int i=1;i<=n;i++)

		cin>>st[i];

	for (int i=1;i<=n;i++)

    for (int j=i;j<=n;j++)

    	if (st[i]>st[j]) swap(st[i],st[j]);

    for (int i=1;i<=n;i++)

    {

    	cout<<st[i];

    }

}

// Faster C++ solution for the same problem (measured speedup: 1.319507820722667x):
#include<bits/stdc++.h>

using namespace std;

bool cmp(string x,string y){

	return x<y;

}

int main(){

	int n,l;

	string x[105];

	scanf("%d%d",&n,&l);

	for(int i=1;i<=n;i++) cin>>x[i];

	sort(x+1,x+n+1,cmp);

	for(int i=1;i<=n;i++) cout<<x[i];

	return 0;

}
// Slower C++ solution:
#include<iostream>

#include<cstring>

using namespace std;

string st[10000];

int n,m;

int main()

{

	cin>>n>>m;

	for (int i=1;i<=n;i++)

		cin>>st[i];

	for (int i=1;i<=n;i++)

    for (int j=i;j<=n;j++)

    	if (st[i]>st[j]) swap(st[i],st[j]);

    for (int i=1;i<=n;i++)

    {

    	cout<<st[i];

    }

}

// Faster C++ solution for the same problem (measured speedup: 1.3312476908792807x):
#include<bits/stdc++.h>

using namespace std;

string a[101];

int n,l;

int main(){

    scanf("%d%d",&n,&l);

    for(register int i=0;i<n;++i)

        cin>>a[i];

    sort(a,a+n);

    for(register int i=0;i<n;++i)

        cout<<a[i];

    return 0;

}
// Slower C++ solution:
#include<iostream>

#include<cstring>

using namespace std;

string st[10000];

int n,m;

int main()

{

	cin>>n>>m;

	for (int i=1;i<=n;i++)

		cin>>st[i];

	for (int i=1;i<=n;i++)

    for (int j=i;j<=n;j++)

    	if (st[i]>st[j]) swap(st[i],st[j]);

    for (int i=1;i<=n;i++)

    {

    	cout<<st[i];

    }

}

// Faster C++ solution for the same problem (measured speedup: 1.3312074510527518x):
#include <iostream>

#include <cstdio>

#include <algorithm>



using namespace std;

string a[101];int n,i;



int main(){

    scanf("%d%*d",&n);

    for(i=0;i<n;i++)

        cin>>a[i];

    sort(a,a+n);

    for(i=0;i<n;i++)

        cout<<a[i];

    return 0;

}
// Slower C++ solution:
#include<iostream>

#include<cstring>

using namespace std;

string st[10000];

int n,m;

int main()

{

	cin>>n>>m;

	for (int i=1;i<=n;i++)

		cin>>st[i];

	for (int i=1;i<=n;i++)

    for (int j=i;j<=n;j++)

    	if (st[i]>st[j]) swap(st[i],st[j]);

    for (int i=1;i<=n;i++)

    {

    	cout<<st[i];

    }

}

// Faster C++ solution for the same problem (measured speedup: 1.3238074390977839x):
#include<bits/stdc++.h>

using namespace std;

string a[105];

int n,k;

int main()

{

	cin>>n>>k;

	for(int i=1;i<=n;i++)

		cin>>a[i];

	sort(a+1,a+n+1);

	for(int i=1;i<=n;i++)

		cout<<a[i];

	return 0;

}
// Slower C++ solution:
#include<iostream>

#include<cstring>

using namespace std;

string st[10000];

int n,m;

int main()

{

	cin>>n>>m;

	for (int i=1;i<=n;i++)

		cin>>st[i];

	for (int i=1;i<=n;i++)

    for (int j=i;j<=n;j++)

    	if (st[i]>st[j]) swap(st[i],st[j]);

    for (int i=1;i<=n;i++)

    {

    	cout<<st[i];

    }

}

// Faster C++ solution for the same problem (measured speedup: 1.3057496040381256x):
#include<bits/stdc++.h>

using namespace std;

int n,m;

string a[101];

int main(){

	ios::sync_with_stdio(false);

	cin>>n>>m;

	for(int i=1;i<=n;i++)

		cin>>a[i];

	sort(a+1,a+1+n);

	for(int i=1;i<=n;i++)

		cout<<a[i];

	return 0;

}
// Slower C++ solution:
#include<iostream>

#include<cstring>

using namespace std;

string st[10000];

int n,m;

int main()

{

	cin>>n>>m;

	for (int i=1;i<=n;i++)

		cin>>st[i];

	for (int i=1;i<=n;i++)

    for (int j=i;j<=n;j++)

    	if (st[i]>st[j]) swap(st[i],st[j]);

    for (int i=1;i<=n;i++)

    {

    	cout<<st[i];

    }

}

// Faster C++ solution for the same problem (measured speedup: 1.3156041301347117x):
#include <bits/stdc++.h>

using namespace std;



int main(void)

{

    string str[100 + 10];

    int n = 0;

    scanf("%d %*d", &n);

    for (int i = 0; i < n; i++)

        cin >> str[i];

    sort(str, str + n);

    for (int i = 0; i < n; i++)

        cout << str[i];

    cout << endl;

    return 0;

}
// Slower C++ solution:
#include<iostream>

#include<cstring>

using namespace std;

string st[10000];

int n,m;

int main()

{

	cin>>n>>m;

	for (int i=1;i<=n;i++)

		cin>>st[i];

	for (int i=1;i<=n;i++)

    for (int j=i;j<=n;j++)

    	if (st[i]>st[j]) swap(st[i],st[j]);

    for (int i=1;i<=n;i++)

    {

    	cout<<st[i];

    }

}

// Faster C++ solution for the same problem (measured speedup: 1.3191681128644097x):
#include<bits/stdc++.h>

using namespace std;

int main()

{

    int n,l;

    string st[102];

    cin>>n>>l;

    for(int i=1;i<=n;i++)

        cin>>st[i];

    sort(st+1,st+n+1);

    for(int i=1;i<=n;i++)

    {

        cout<<st[i];

    }   

    cout<<endl;

    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <algorithm>

#include <string>

using namespace std;



int main() {

	int n,l;

	string s[100000];

	cin>>n>>l;

	for(int i=0;i<n;i++) cin>>s[i];

	sort(s,s+n);

	for(int i=0;i<n;i++) cout<<s[i];

	cout<<endl;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 4.371144214610781x):
#include <iostream>

#include <string>

#include <algorithm>

#include <queue>

#include <vector>

#include <cstdio>

#include <cmath>

#include <cctype>

#define rep(i,a,b) for(int i=(a);i<b;i++)

#define INF 1000000000

#define MAX_N 105

using namespace std;

bool debug=false;



int main(){

  int N,L;

  string s[101];



  cin>>N>>L;



  rep(i,0,N)cin>>s[i];

  sort(s,s+N);



  rep(i,0,N)cout<<s[i];

  cout<<endl;

  

  return 0;

}
// Slower C++ solution:
#include <iostream>

#include <algorithm>

#include <string>

using namespace std;



int main() {

	int n,l;

	string s[100000];

	cin>>n>>l;

	for(int i=0;i<n;i++) cin>>s[i];

	sort(s,s+n);

	for(int i=0;i<n;i++) cout<<s[i];

	cout<<endl;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 4.37173614715969x):
#include <iostream>

#include <algorithm>

#include <string>

#include <vector>

#include <cstdio>

#include <cmath>

#include <cstdlib>

#include <cstring>

#include <stack>

#include <queue>

#include <set>

#include <map>

#include <utility>

#include <ctime>

#define INF 1000000000

#define LINF 9000000000000000000

#define mod 1000000007

 

#define rep(i,n) for(int i=0;i<int(n);i++)

#define rrep(i,n) for(int i=(n);i>=0;i--)

#define REP(i,a,b) for(int i=(a);i<int(b);i++)

#define all(x) (x).begin(),x.end()

#define rsort(x) sort(all(x));reverse(all(x))

#define pb push_back

#define mp make_pair

#define MOD(x) (x%(mod))

using namespace std;

 

typedef long long ll;

typedef unsigned long long ull;

typedef vector<int> vi;

typedef pair<int,int> pi;

 

int dx[4]={1,0,-1,0};

int dy[4]={0,1,0,-1};



bool debug=false;

/*---------------------------------------------------*/



int main(){

  int n,l;

  string s[105];

  cin>>n>>l;

  rep(i,n)cin>>s[i];

  sort(s,s+n);

  rep(i,n)cout<<s[i];

  cout<<endl;

  return 0;

}
// Slower C++ solution:
#include <cstdlib>

#include <cstdio>

#include <algorithm>

#include <iostream>

#pragma GCC optimize(2)

using namespace std;

string s1[10005];

bool cmp(string a,string b){

	return a<b;

}

void print(){

	int n,l;

	cin>>n>>l;

	

	int i;

	for(i=0;i<n;i++)

		cin>>s1[i];

	sort(s1,s1+n,cmp);

	for(i=0;i<n;i++)

	    cout<<s1[i];

}

int main(void){

	ios::sync_with_stdio(false);

	print();

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.3161903792094234x):
#include<iostream>

#include<string>

#include<algorithm>



using namespace std;



int n, l;

string c[1000];



int main()

{

	cin >> n >> l;

	for (register int i = 1; i <= n; i++)

		cin >> c[i];

	sort(c + 1, c + n + 1);

	for (register int i = 1; i <= n; i++) cout << c[i];

}
// Slower C++ solution:
#include <cstdlib>

#include <cstdio>

#include <algorithm>

#include <iostream>

#pragma GCC optimize(2)

using namespace std;

string s1[10005];

bool cmp(string a,string b){

	return a<b;

}

void print(){

	int n,l;

	cin>>n>>l;

	

	int i;

	for(i=0;i<n;i++)

		cin>>s1[i];

	sort(s1,s1+n,cmp);

	for(i=0;i<n;i++)

	    cout<<s1[i];

}

int main(void){

	ios::sync_with_stdio(false);

	print();

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.3470888607424865x):
#include<iostream>

#include<cstring>

#include<algorithm>

using namespace std;

int main()

{

	int i,j,k,n,l;

	cin>>n>>l;

	string s[n];

	for(i=0;i<n;i++)

		cin>>s[i];

	sort(s,s+n);

	for(i=0;i<n;i++)

		cout<<s[i];

	return 0;

}
// Slower C++ solution:
#include <cstdlib>

#include <cstdio>

#include <algorithm>

#include <iostream>

#pragma GCC optimize(2)

using namespace std;

string s1[10005];

bool cmp(string a,string b){

	return a<b;

}

void print(){

	int n,l;

	cin>>n>>l;

	

	int i;

	for(i=0;i<n;i++)

		cin>>s1[i];

	sort(s1,s1+n,cmp);

	for(i=0;i<n;i++)

	    cout<<s1[i];

}

int main(void){

	ios::sync_with_stdio(false);

	print();

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.354793078549974x):
#include<bits/stdc++.h>

using namespace std;

string a[101];int n,i;

int main(){

    scanf("%d%*d",&n);

    for(i=0;i<n;i++)

        cin>>a[i];

    sort(a,a+n);

    for(i=0;i<n;i++)

        cout<<a[i];

    return 0;

}
// Slower C++ solution:
#include <cstdlib>

#include <cstdio>

#include <algorithm>

#include <iostream>

#pragma GCC optimize(2)

using namespace std;

string s1[10005];

bool cmp(string a,string b){

	return a<b;

}

void print(){

	int n,l;

	cin>>n>>l;

	

	int i;

	for(i=0;i<n;i++)

		cin>>s1[i];

	sort(s1,s1+n,cmp);

	for(i=0;i<n;i++)

	    cout<<s1[i];

}

int main(void){

	ios::sync_with_stdio(false);

	print();

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.3427708935226206x):
#include<iostream>

#include<string.h>

#include<algorithm>

using namespace std;

int main()

{

	int n,m;

	cin>>n>>m;

	string a[n];

	for(int i=0;i<n;i++)

	cin>>a[i];

	sort(a,a+n);

	for(int i=0;i<n;i++)

	{

		cout<<a[i];

	}

	cout<<endl;

	return 0;

}
// Slower C++ solution:
#include <cstdlib>

#include <cstdio>

#include <algorithm>

#include <iostream>

#pragma GCC optimize(2)

using namespace std;

string s1[10005];

bool cmp(string a,string b){

	return a<b;

}

void print(){

	int n,l;

	cin>>n>>l;

	

	int i;

	for(i=0;i<n;i++)

		cin>>s1[i];

	sort(s1,s1+n,cmp);

	for(i=0;i<n;i++)

	    cout<<s1[i];

}

int main(void){

	ios::sync_with_stdio(false);

	print();

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.347610693126778x):
#include <iostream>

#include <algorithm>

using namespace std;

int main(){

    string a[101];

    long long n,i,l;

    cin>>n>>l;

    for(i=0;i<n;i++)

        cin>>a[i];

    sort(a,a+n);

    for(i=0;i<n;i++)

        cout<<a[i];

    return 0;

}
// Slower C++ solution:
#include <cstdlib>

#include <cstdio>

#include <algorithm>

#include <iostream>

#pragma GCC optimize(2)

using namespace std;

string s1[10005];

bool cmp(string a,string b){

	return a<b;

}

void print(){

	int n,l;

	cin>>n>>l;

	

	int i;

	for(i=0;i<n;i++)

		cin>>s1[i];

	sort(s1,s1+n,cmp);

	for(i=0;i<n;i++)

	    cout<<s1[i];

}

int main(void){

	ios::sync_with_stdio(false);

	print();

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.3140203212899138x):
#include <bits/stdc++.h>

using namespace std;

int l,len,i,j,mid,k,r,n,m;

string s[1001];



int main(){

   cin>>n>>m;

   for(i=1;i<=n;i++)cin>>s[i];

   sort(s+1,s+n+1);

   for(i=1;i<=n;i++)cout<<s[i]; 

   cout<<"\n";  

    return 0;

}
// Slower C++ solution:
#include <cstdlib>

#include <cstdio>

#include <algorithm>

#include <iostream>

#pragma GCC optimize(2)

using namespace std;

string s1[10005];

bool cmp(string a,string b){

	return a<b;

}

void print(){

	int n,l;

	cin>>n>>l;

	

	int i;

	for(i=0;i<n;i++)

		cin>>s1[i];

	sort(s1,s1+n,cmp);

	for(i=0;i<n;i++)

	    cout<<s1[i];

}

int main(void){

	ios::sync_with_stdio(false);

	print();

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.3268124983123613x):
#include<iostream>

#include<cstring>

#include<algorithm>

#include<cstdio>

#include<string>

using namespace std;

string str[102];

int n,l;

using namespace std;

int main()

{

	ios::sync_with_stdio(false);

	cin>>n>>l;

	for(int i=1;i<=n;i++)

	{

		cin>>str[i];

	}

	sort(str+1,str+n+1);

	for(int i=1;i<=n;i++)

	{

		cout<<str[i];

	}

	cout<<"\n";

	return 0;

}