#include<stdio.h>
#include<string.h>
#include<stdlib.h>
char *stack[MAX];
int top=-1;
void push(char* word){
    if(top<MAX-1){
        stack[++top]==word; 
    }
}
char* pop(){
    if(top>=0){
        return stack[top--];
    }
    return NULL;
}
void reverseSentence(char* sentence){
    char* word=strtok(sentence,"");
    while(word!=NULL){
        push(word);
        word=strtok(NULL,"");
    }
    while(top>=0){
        printf("%s",pop());
        if(top>=0){
            printf("");
        }
    }
    printf("\n");
}
int main(){
    int n;
    char sentence[MAX];
    scanf("%d\n",&n);
    fgets(sentence,sizeof(sentence),stdin);
    sentence[strcspn(sentence,"\n")]=0;
    if(n<0){
        printf("Invalid input\n");
    }else{
        reverseSentence(sentence);
        
    }
    return 0;
}