#include<bits/stdc++.h>
using namespace std;
int main(){
    vector<string> vs;
    string tmp;
    while(cin>>tmp)
        vs.emplace_back(tmp);
    copy(vs.rbegin(),vs.rend(),ostream_iterator<string>(cout," "));
}