
#include <stdio.h>
#include <string.h>
char Sort(char *p)
{
char tmp;
if (p[0]>p[1])
{
tmp=p[0];
p[0]=p[1];
p[1]=tmp;
}
if (p[0]>p[2])
{
tmp = p[0];
p[0] = p[2];
p[2] = tmp;
}
if (p[1]>p[2])
{
tmp=p[1];
p[1]=p[2];
p[2]=tmp;
}
return *p;
}
void Printf_P(char *p , int k)
{
unsigned int i=1;
}
int main()
{
char s1[3]={0};
char s2[30]={0};
int i=0,j;
int k;
scanf("%i",&i);
k=i;
for(j=0;j<k;j++)
{
scanf("%s",s1);
getchar();
Sort(s1);
if(strlen(s2)==0)
{
strcpy(s2,s1);
}
else
strcat(s2,s1);
}
Printf_P(s2,k);
printf("\n");
return 0;
}