#include<stdio.h>
#include<stdlib.h>
typedef struct Node{
    int data;
    struct Node *next;
}  Node;

int main(){
    int n,x;
    if (scanf("%d , &n")  != 1 || n <= 0){
        printf("Invalid Input\n");
        return 0;
    }
    Node *head = NULL, *tail = NULL, *p
    
    for(int i = 0; i < n; i++){
        if(scanf("%d", &x) != 1){
            printf("Invalid Input\n");
            return 0;
            
        }
        p->data = x;
        p->next = NULL;
        if (!head){
            head = tail = p;
            
        }else {
            tail->next = p;
            tail = p;
        }
    }
    for (p = head; p; p = p->next){
        printf("%d", p->data);
        if(p->next)printf("");
        
    }
    printf("\n");
    
    while (head){
        p = head;
        haed = head->next;
        free(p);
        
    }
    return 0;
    
}