#include<stdio.h>
#include<stdlib.h>


typedef struct node{
   int data;
   struct node *next;
   struct node *prev;
}Node;

  Node *head=NULL,*tail=NULL,*temp;
  int count=0,flag=0;
  int create(int val){
    Node *new= (Node*)malloc(sizeof(Node));
    newnode->data=val;
    newnode->next=NULL;
    newnode->prev=NULL;
    
    if(head==NULL){
        head=tail=new;
    }
    else{
        newnode->prev=tail;
        tail->next=newnode;
        tail=newnode;
    }
}

void display(){
    temp=tail;
    while(temp != NULL){
        printf("%d ",temp->data);
        temp=temp->prev;
    }

}

int main(){
    int n,val;
    
    scanf("%d",&n);
    if(n<0){
        printf("Invalid Input");
        return 0;
    }
    for(int i=0 ; i<=n;i++){
        scanf("%d",&val);
        create(val);
        
    }
    display();
    
    return 0;
}