// 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;
int top=0;

void push(char c[50])
{
    node *nd=(node*)malloc(sizeof(node));
    int i;
    for(i=0;c[i]!='\0';i++)
    {
        nd->s[i]=c[i];
    }
    nd->s[i]c = '\0';
    nd->next=nd->prev=NULL;
    if(head==NULL)
    {
        head=tail=nd;
    }
    else
    {
        nd->prev=tail;
        tail->next=nd;
        tail=nd;
    }
}

void print()
{
    node *i;
    for(i=tail;i!=head;i=i->prev)
    {
        printf("%s ",i->s);
    }
    printf("%s",i->s);
}
int main()
{
    int n;
    scanf("%d",&n);
    if(n<0)
    {
        printf("Invalid input");
        return 0;
    }
    for(int i=0;i<n;i++)
    {
        char c[50];
        if(scanf("%s",c)!=1)
        break;
        push(c);
    }
    print();
}