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