#include<stdio.h>
#include<stdlib.h>
struct Node{
    int data;
    struct Node*next;
    
};
int main(){
    int n,value;
    if(scanf("%d",&n)!=1||n<1||n>100)
    {
        return 0;
    }
    struct Node*head=NULL;
    for(int i=0;i<n;i++){
        if(scanf("%d".&value)!=1||value< -10000||value> 1000){
        return 0;
    }
    struct Node*newNode=(struct Node*)malloc(sizeof(struct Node));
    newNode->data=value;
        newNode->next=head;
        head=newNode;
}
struct Node*temp=head;
while(temp!=NULL){
    printf("%d ",temp->data);
    temp=temp->next;
}
return 0;
}