//土尔逊Torson 编写于2023/4/28
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <stack>
#include <cstdlib>

using namespace std;

stack<long long> Sequence;

int main() {
	int n;
	while (scanf("%d", &n) != EOF) {
		while (n--) {
			long long number;
			scanf("%lld", &number);
		    Sequence.push(number);
		}
		while (!Sequence.empty()) {
			printf("%lld ", Sequence.top());
			Sequence.pop();
		}
		printf("\n");
	}
	//system("pause");
	return EXIT_SUCCESS;
}
// 64 位输出请用 printf("%lld")