#include <stdio.h>
#include <string.h>
#define MAX 100
void reverseSentence(char *sentence){
    char *words[MAX];
    int count = 0;
    char *token = strtok(sentence," ");
    while (token !=NULL && count < MAX){
        words[count++] = token;
        token = strtok(NULL" ");
    }
for (int i = count - 1; i >= 0; i--){
    printf("%s" , words[i]);
    if (i > 0) printf(" ");
}
printf("\n");
}
int main(){
    int n;
    char sentence[MAX];
    scanf("%d" , &n);
    getchar(); // Consume newline
    fgets(sentence, sizeof(sentence),stdin);
    sentence[strcspn(sentence, "\n")] = 0; //Remove newline
    if (n < 0){
        printf("Invalid Input\n");
    } else {
        reverseSentence(sentence);
    }
    return 0;
}