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