#include<stdio.h>
#include<string.h>
int main()
{
    int n;
    char str[101];
    char stack[10[20];
    int top=-1;
    scanf("%d",&n);
    getchar();
    if(n<0)
    {
        printf("Invalid input");
        return 0;
    }
    fgets(str,sizeof(str),stdin);
    
    char *word=strtok(str," ");
    while(word !=NULL)
    {
        
        word=strtok(NULL," ");
    }
    while(top>=0)
    {
        printf("%s ",stack[top--]);
        if(top>=0)
        printf(" ");
    }
    return 0;
}