#include <iostream>
#include <string>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;

int main() {

    string S;
    cin >> S;

    cout  << S.substr(1) << S.substr(0, 1) << endl;

    return 0;
}
// Jai Shree Ram
#include<bits/stdc++.h>
typedef long long int ll;
#define pb push_back
#define max2(a,b) (a>b)?a:b
#define mi2(a,b) (a<=b)?a:b
#define fori(i,n) for(ll i=0;i<(ll)n;i++)
#define ford(i,n) for(ll i=n;i>=0;i--)
#define pll pair<ll,ll>
#define mod 1000000007
#define ff first
#define ss second
using namespace std;
#define MAXI 1e9
#define MAX_LIMIT 500001


void solve()
{
	string s;
	cin>>s;
	ll cn=0;
	for(int i=1;i<=3;i++)
	{
		if(cn==3)
		{
			break;
		}
		cout<<s[i%3];
		cn++;
	}
	cout<<"\n";
	




}
 
 
 
int main()
{
     

 
    ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);




    
    ll T;
    T=1;
    //cin>>T;
    
    fori(_,T)
    {
        solve();
    }
    
   
 
 
    
 
}
