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