#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
vector<string> s;
string str;
while (cin >> str) {
s.push_back(str);
}
reverse(s.begin(), s.end());
for (auto c : s) cout << c << ' ';
cout << endl;
return 0;
}