// editor2
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define MAX 100
typedef struct node{
    char data[MAX];
    struct node *prev;
    struct node *next;
}Node;
Node *head=NULL,*tail;
void create(char *ch){
    Node
    Node *newnode = (Node*)malloc(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 *itr=tail;
    for(;itr!=head;itr=itr->prev){
        printf("%s",itr->data);
    }
    printf("%s",itr->data);
}
int main(){
    int n,num;
    scanf("%d",&n);
    if(n<0){
        printf("Invalid input");
        return 0;
    }
    char ch[20];
    for(int i=0;i<n;i++){
        if(scanf("%s",ch)==1){
            create(ch);
        }
    }
    display();
    return 0;
}