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