#include<iostream>
#include<algorithm>
using namespace std;
int main(){
    string s,word;
    getline (cin,s);
    for(int i=0;i<=s.length();i++){
        if(i==s.length()||s[i]==''){
            reverse(word.begin(),word.end());
            cout<< word;
            if(i!=s.length()) cout<<"";
            word="";
        }
        else{
            word+=s[i];
        }
    }
    return 0;
}