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