#include <iostream>
#include <stack>
using namespace std;
stack<int> stk;
int main() {
    int n, num;
    while (cin >> n) {
        while (n --) {
            cin >> num;
            stk.push(num);
        }
        while (!stk.empty()) {
            cout << stk.top() << ' ';
            stk.pop();
        }
        cout << endl;
    }
    return 0;
}