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