#include<stdio.h>
#include<stdlib.h>
struct Node{
    int data;
    struct Node*next;
};
void insert(struct Node**head,int value){
    struct Node*newNode=(struct Node*)malloc(sizeof(struct Node));
    newNode->data=value;
    newNode->next=NULL;
    if(*head==NULL){
        *head=newNode;
        return;
    }
    struct Node*temp=*head;
    while(temp->next!=NULL){
        temp=temp->next;
    }
    temp->next=newNode;
}
void traverse(struct Node*head){
    struct Node*temp=head;
    while(temp !=NULL){
        printf("%d",temp->data);
        temp=temp->next;
    }
}
int main(){
    int n;
    scanf("%d",&n);
    if(n<0){
        printf("Invalid input");
        return 0;
    }
    struct Node*head=NULL;
    int value;
    for(int i=o;i<n;i++){
        scanf("%d",&value);
        insert(&head,value);
    }
    traverse(head);
    return 0;
}