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