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