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