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