#include<bits/stdc++.h>
#define ll  long long
using namespace std;

#define  quick  ios_base::sync_with_stdio(false); cin.tie(0);cout.tie(0);
#define s(x) sort(x.begin(),x.end())
#define sr(x) sort(x.begin(),x.end(),greater<ll>())
#define v1 vector<ll>
#define p1 pair<ll,ll>
#define m1 map<ll,ll>
#define ff first
#define ss second
#define ee '\n';
#define pb push_back
#define all(v) v.begin(),v.end()
#define f(i,x,y) for(i=x;i<y;i++)
#define mp make_pair
#define yes cout<<"YES"<<endl
#define no  cout<<"NO"<<endl


void solve()
{
       string s;
       cin>>s;
       cout<<s[1]<<s[2]<<s[0]<<ee;
}

 int32_t main()
 {
    quick;
    ll t=1;
    //cin>>t;
    while(t--)
    {
       solve();
    }
    return 0;
 }
#include<bits/stdc++.h>
using namespace std;

#define sf scanf
#define pf printf

const int high=1e3+5;

int main()
{
    string s, ans="";

    while(cin >> s)
    {
        int len = s.length();

        for(int i=1; i<len; i++)
        {
            ans += s[i];
        }

        ans+=s[0];

        cout << ans << "\n";

        ans.clear();
    }

    return 0;
}
