#include<stdio.h>
#include<stdlib.h>
#include<string.h>

typedef struct node
{
    char ch;
    struct node*next;
    struct node*prev;
}Node;
Node *head=NULL,*tail;
void create(char* ch)
{
    Node *newNode =(Node*)malloc(1*sizeof(Node));
    strcpy(newNode->data,ch);
    newNode->next=NULL;
    newNode->prev=NULL;
    if(head==NULL)
    {
        head=newNode;
        tail=newNode;
    }
    else
    {
        newNode->prev=tail;
        tail->next=newNode;
        tail=newNode;
    }
}
void display()
{
    Node *i=tail;
    for(;i!=head;i=i->prev)
      printf("%s",i->data);
      printf("%s",i->data);
}
int main()
{
    int size,i;
    scanf("%d",&size);
    if(size<0)
    {
        printf("Invalid input");
        return 0;
    }
    char ch[20];
    for(i=1;i<=size;i++)
    {
        if(scanf("%s",ch)!=1)
        {
            printf("Invalid input");
            return 0;
            
        }
        create(ch);
    }
    display();
}