#include<iostream.h>
#include<strstream.h>
#include<string.h>
char a[255][128];
int i,j;

int main(){
    i=0;
    char tmp[255];
    cin.getline(tmp,255);
    istrstream out(tmp,strlen(tmp));
    while ( !out.eof() ){
	out>>a[i];
	i++;
    }
    cout<<a[i];
    i--;
    for (;i>=1;i--)
	cout<<a[i]<<" ";
    cout<<a[0];
    cout<<"\n";
    return 0;
}
























