#include <iostream>
#include <stack>

using namespace std;
stack<int> bb;
int main() {
    int n;
    cin >>n;
    int x; 
    while (scanf("%d",&x) != EOF) { // 注意 while 处理多个 case
        bb.push(x);
    }
    int y = bb.size();
    for(int i=1;i<=y;++i){
        printf("%d ",bb.top());
        bb.pop();
    }


}
// 64 位输出请用 printf("%lld")