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