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