#include <iostream> #include <vector> #include <string> using namespace std; int main() { vector<string> svec; string s; bool first = false; while (cin >> s){ svec.push_back(s); } for (auto c = svec.rbegin(); c != svec.rend(); ++c){ if (first) cout << " "; else first = true; cout << *c; } cout << endl; }