#include <iostream>
using namespace std;
int main()
{
// 类型 变量名[数];
int a[150] = {}; // 全初始化为0
int num;
int x = 0;
while (cin >> num)
{
a[x++] = num;
}
for (int i = x - 1; i >= 0; i--)
{
cout << a[i] << " ";
}
return 0;
}