#include<stdio.h>
#include<stdlib.h>
typedef struct Node{
     int data;
     struct Node*prev;
     struct Node*next;
     }Node;
typedef struct DoublyLinkedList{
     Node*head;
     Node*tail;
     }DoublyLinkedList;
Node*createNode(int data){
     Node*newNode=
     (Node*)malloc(sizeof(Node));
     newNode->data=data;
     newNode->prev=NULL;
     newNode->prev=NULL;
     return newNode;
     }
void initList(DoublyLinkedList*list){
     list->head=NULL;
     list->tail=NULL;
     }
void insert(DoublyLinkedList*list,int data){
     Node*newNode=createNode(data);
     if(list->head==NULL){
     list->head=list->tail=newNode;
     }}
void display(DoublyLinkedList*list){
     Node*current=list->head;
     while(current!=NULL){
       printf("%d",current->data);
       if(current->next!=NULL)printf(" ");
       current=current->next;
       }
       printf("\n");
       }
int main(){
int n;
if(scanf("%d",&n)!=1||n<=0){
printf("Invalid input\n");
return 0;
}
DobleyLinkedList list;
initList(&list);
for(int i=0;i<n,i++){
printf("Invalid input\n");
return 0;
}
insert(&list,value);
}
display(&list);
return 0;
}