#include <stdio.h>
#include <stdlib.h>
struct Node{
    int data;
    struct Node*prev;
    struct Node*next;
};
struct Node*createNode(int data){
    struct Node*newNode=(struct Node*)malloc(sizeof(struct Node));
    if(!newNode){
        printf("Memory allocation error\n");
        exit(1);
    }
    newNode->data=data;
    newNode->prev=NULL;
    newNode->next=NULL;
    return newNode;
}
void insertEnd(struct Node**head,int data){
    struct Node*newNode=createNode(data);
    if(*head==NULL);
    *head = newNode;
    return;
}
struct Node*temp=*head;
while(temp->next!=NULL){
    temp=temp->next;
}
temp->next=newNode;
newNode->prev=temp;
}
void printList(struct Node*head){
    struct Node*temp=head;
    while(temp!=NULL){
        printf("%d",temp->data);
        if(temp->next!=NULL)
        printf(" ");"
        temp=temp->next;
    }
    printf("\n");
}
int main(){
    int n,id;
    struct Node*head = NULL;
    if(scanf("%d",&n)!=1 ||n<=0 ||n>10){
        printf("Invalid input\n");
        return 0;
    }
    insertEnd(&head,id);
}
printList(head);
return 0;
}