#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 (1 * 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 size;
    scanf("%d",&size);
    for(itr=1;itr<=size;itr++) {
        if(scanf("%s",ch) != 1)
            break;
        create(ch);
    }
    display();
    return 0;
}