// editor2
#include<stdio.h>
#include<stdlib.h>

typedef struct tree
{
    int data;
    struct tree *left,*right;
}node;

node *create(char c)
{
    node *nd=(node*)malloc(sizeof(node));
    nd->data=c;
    nd->left=nd->right=NULL;
    return nd;
}

void ins(char *c, node* root)
{
    if(root==NULL)
    {
        return create(n);
    }
    if(n<root->data)
    {
        root->left=ins(c,root->left);
    }else{
         root->right=ins(c,root->right);
    }
    return root;
}

void in(node *root)
{
    if(root==NULL)
    {
        return;
    }
    in(root->left);
    printf("%c",root->data);
    in(root->right);
}

int main()
{
    node*root=NULL;
    int size,i;
    scanf("%d",&size);
    if(size<0)
    {
        printf("Invalid input");
    }
    for(i=0;i<size;i++)
    {
        char data;
        scanf("%s",data);
        root=ins(data,root);
    }
    in(root);
}