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