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