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