// editor1
#include <stdio.h>
#include<stdlib.h>
struct Node
{
int data;
struct Node*next;
};
struct Node*createNode(int data)
{
  struct Node*newNode=(struct Node*)malloc(sizeof(struct Node));
  newNode->data=data;
  new Node->next=NULL;
  return newNode;
}
int main()
{
    int n, vale;
    if(scanf("%d,&n")!=1||n<=0||n>10)
    {
        printf("Invalid input");
        return 0;
        
    }
    struct Node*head=NULL;
    struct Node*tail=NULL;
    fo(int i=0;i<n;i++)
    {
        if(scanf("%d",&vale)!=1||value<-10000||vale>10000)
        {printf("Invalid input");
        return 0;
        
    }
    struct Node*newNode=createNode(value);
    if(head==NULL)
    {
        head=newNode;
        tail=newNode;
        
    }
    else
    {
        tail->next=newNode;
        tail=newNode;
        
    }
}
 struct Node*temp=head;
 while(temp!=NULL)
 {
     printf("%d",temp->data);
     temp=temp->next;
 }
 return 0;
}