#include<iostream>
#include<cstdio>
#include<stack>

using namespace std;

int main() 
{
    int n;
    stack<long long> sequence;
    long long number;
    while(scanf("%d",&n)!=EOF)
    {
        for(int i=0; i<n; ++i)
        {
            scanf("%lld",&number);
            sequence.push(number);
        }
        while(!sequence.empty())
        {
            printf("%lld ",sequence.top());
            sequence.pop();
        }
        printf("\n");
    }
    return 0;
}