#include <stdio.h>
#include <string.h>
int main(){
    int n;
    char sentence[101];
    char stack[20][101];
    int temp =-1;
    scanf("%d",&n);
    if(n<0){
        printf("Invalid input");
        return 0;
    }
    scanf(" %[^\n]",sentence);
    char *token=strock(sentence," ");
    while(token != NULL){
        strcpy(stack[++top],token);
        token=strtok(NULL," ");
    }
    while(top>=0){
        printf("%s",stack[top--]);
        if(top>=0)
        printf(" ");
    }
    return 0;
}