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