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