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