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

int main() 
{
    int i=0;
    string a;
    vector <string> b;
    int n=0;
    while(cin>>a)
    {
        b.push_back(a);
        n++;
    }
    for(i=n-1;i>=0;i--)
    {
        cout<<b[i];
        if(i)
        {
            cout<<" ";
        }
    }
    return 0;
}