#include <stdio.h>
#include <stdlib.h>
int main(){
    int n;
    scanf("%d" , &n);
    // check for invalid input(n is negative)
    if (n < 0){
        printf("Invalid input\n");
        // corrected 'Invalid'typo
        return 0;
    }
    // since n is now guaranteed to be >=0 (and based on constraints 1 <= n <= 1000)
    // the VLA declaration is safe here.
    // if n=0 were allowed,the scanf loop would not run, which is fine.int stack[n];
    // variable Length Array (VLA)
    // Loop to read stack elements 
    for (int i = 0; i < n; i++){
        scanf("%d" , &stack[i]);
    }
    // Loop to print stack elements
    for (int i = 0; i < n; i++){
        printf("%d" , stack[i]);
    }
    printf("\n");
    return 0;
}