#include<stdio.h>
#include<stdlib.h>
typedef struct node
{
    int data;
    struct node *next;
}Node;
 Node *head=NULL,*tail;

void create( int num)
{
  Node *newnode=(Node*)malloc(sizeof(Node));
  newnode->data=num;
  newnode->next=NULL;
  if(head==NULL)
  {
      head=newnode;
      tail=newnode;
  }
  else
  {
      tail->next=newnode;
      tail=newnode;
  }
}
void del()
{
    head->next=NULL;
    for(head=temp;temp!=NULL;temp=temp->next)
    {
        temp1=temp;
        temp=temp->next;
    }
}
void display()
{
    Node *itr;
    for(itr=head;itr!=NULL;itr=itr->next)
       printf("%d",itr->data);
}
int main()
{
    int num,n,itr;
    scanf("%d",&n);
    if(n<0)
    {
        printf("Invalid input");
        return 0;
    }
    for(itr=0;itr<n;itr++)
    {
        scanf("%d",&num);
        create(num);
    }
    del();
    display();
    return 0;
}