#include<stdio.h>
#include<string.h>
#define MAX 10
#define WORD_LEN 100
char stack[MAX][WORD_LEN];
int top = -1;
void push(char word[]){
    strcpy(stack[++top], word);
}
char* pop(){
    return stack[top--];
}
int main(){
    int n;
    char sentence[100];
    char *token;
    scanf("%d", &n);
    getchar();
    if(n<0){
        printf("Invalid input");
        return 0;
    }
    fgets(sentence, sizeof(sentence),stdin);
    token = strtok(sentence, " ");
    while
    (token != NULL && top < n - 1){
        push(token);
        token = strtok(NULL, " ");
    }
    while(top != -1){
        printf("%s", p)
    }
}