// editor1
#include<stdio.h>
#include<stdlib.h>
struct Node{
    int data;
    struct Node*next;
};
struct Node*head=NULL,*tail=NULL;
void create(int num){
    struct Node*newnode=(structNode*)malloc(sizeof(struct Node));
    newNode->data=num;
    newNode->next=NULL;
    if(head==NULL){
        head=newNode;
        tail=newNode;
    }
    else{
        tail->next=newNode;
        tail=newNode;
    }
}
void remove(){
    if(head==NULL)return;
    struct Node*temp=head;
    head=head->next;
    free(temp);
}
void display(){
    struct Node*i;
    for(i=0;i!=NULL;i=i->next){
        printf("%d ",i->data);
    }
}
int main(){
    int i,num,size;
    if(scanf("%d",&size)!=1||size<0){
        printf("Invalid input");
        return 0;
    }
    for(i=0;i<size;i++){
        if(scanf("%d",&num)!=1){
            printf("Invalid input");
            return 0;
        }
        create(num);
    }
    display();
    return 0;
}