#include<stdio.h>
#include<stdlib.h>
typedef struct node{
    int data;
    struct node*next;
}Node;
Node*head=NULL,*tail;
Node* create(int num){
    Node*newNode=(Node*)malloc(sizeof(Node));
    newNode->data=num;
    newNode->head=NULL;
    newNode->tail=NULL;
    if(head==NULL){
        head=newNode;
        tail=newNode;
    }
    else{
        newNode->next=tail;
        tail=newNode;
    }
}
void display(){
    Node*itr;
    for(itr=head;itr!=NULL;itr=itr->next)
    printf("%d ",itr->data);
}
int main(){
    int i,n,num;
    scanf("%d",&n);
    if(n<0){
        printf("Node not found");
        return 0;
    }
    for(i=0;i<n;i++)
    {
        scanf("%d",&num);
        create(num);
    }
    display();
    return 0;
}