// editor2
#include<stdio.h>
#include<stringh>
int main(){
    int n;
    char sentence[101];
    char stack[20][101];
    int top=-1;
    scanf("%d",&n);
    if(n<0){
        printf("Invalid input");
        return 0;
    }
    scanf(" %[^\n",sentence);
    char *token(sentence," ");
    while(token!=NULL){
        strcy(stack[++top],token);
        token=strtok(NULL," ");
    }
    while(top>=0){
        printf("%s",stack[top--]);
        if(top>=0)
        printf(" ");
    }
    return o;
}