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