#include <iostream>
#include <vector>
using namespace std;

int main() {
    string str;
    vector<string> vec;
    while (cin >> str) { 
        vec.push_back(str);
    }
    for (int i = vec.size()-1; i >= 0; --i){
        cout << vec[i] << ' ';
    }
    return 0;
}