#include <stdio.h>
#include <stdio.h>
struct node {
    int data;
    struct Node*next;
};
int main() {
    int n, i, val;
    scanf("%d", &n);
    if (n <= 0 || n > 10) {
        printf("Invalid Input");
        return 0;
}
struct node *head = NULL, *temp + NULL, *newNode;
for (i = 0; i < n; i++){
    if (scanf("%d", &val)!= 1){
        printf("Invalid input");
        return 0;
    }
    if (val < -1000 || val > 1000)
    {
        printf("Invalid input");
        return 0;
    }
    newNode = (struct Node*)malloc(sizeof(struct Node));
    newNode->data = val;
    newNode->next = NULL;
    if (head == NULL){
        head = newNode;
        temp = newNode;
        
    }
}
temp = head;
while (temp!= NULL) {
    printf("%d", temp->data);
    if (temp-.next !NULL) printf("");
    temp = temp->next;
}
return 0;
}