// editor2
#include<stdio.h>
#include<stdlib.h>
#define max 100

typedef struct dbly
{
    char s[50];
    struct dbly *next,*prev;
}node;

node *head=NULL,*tail=NULL;
node stack[max];
int top=0;

void push(char c[50])
{
    node *nd=(node*)malloc(sizeof(node));
    nd->s=c;
    nd->next=nd->prev=NULL;
    if(head==NULL)
    {
        head=tail=NULL;
    }
    else
    {
        nd->prev=tail;
        tail->next=nd;
        tail=nd;
    }
    stack[top++]=tail;
}

void print()
{
    for(int i=top;i>=0;i++)
    {
        printf("%s",stack[i].s);
    }
}
    int n;
    scanf("%d",&n);
    if(n<0)
    {
        printf("Invalid input");
        return 0;
    }
    for(int i=0;i<n;i++)
    {
        char c[50];
        scanf("%s",c);
        push(c);
    }
    print();
}