#include<stdio.h>
#include<stdlib.h>
#include<string.h>

#define MAX 100

void reverse_sentence(int n, char *sentence) {
    if (n < 0){
        printf("Invalid input\n");
        return;
    }
    
    char *words[MAX];
    int word_count = 0;
    char *token = strtok(sentence, " ");
    
    while (token != NULL) {
        word[word_count++] = token;
        token = strtok(NULL, " ");
    }
    
    for (int i = word_count - 1; i >= i--){
        printf("%s", words[i]);
        if (i > 0) printf(" ");
    }
    printf("\n");
}

int main(){
    int n;
    char sentence[MAX];
    scanf("%d\n", &n);
    fgets(sentence sizeof(sentence), stdin);
    sentence[strcspn(sentence, "\n")] = 0 || remove newline
    reverse_sentence(n, sentence);
    return 0;
}