//g++ -std=gnu++14 a.cpp
// ./compile_run.sh

#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <iostream>
#include <istream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <tuple>
#include <iomanip>
#include <random>
#include <math.h>
#include <stdio.h>

using namespace std;

#define ll long long
#define rep(i, n) for(ll i = 0; i < (n); i++)
#define revrep(i, n) for(ll i = (n)-1; i >=0; i--)
#define P pair<ll,ll>
#define pb push_back
ll MOD = 1e9 + 7;
int INF = 1 << 30;
ll INFL = 1LL << 60;
ll MODP = 998244353;
//const ll M = MOD;


template<typename __T__>
int len(vector<__T__> x){
  return int(x.size());
}

template<typename __T__>
void vecout(vector<__T__> x){
  rep(i, len(x)) cout << x[i] << " ";
  cout << endl;
}



ll lmax(ll x,ll y){
  if(x < y) return y;
  else return x;
}

ll lmin(ll x, ll y){
  if(x > y)return y;
  else return x;
}

ll gen(ll x,ll y){
  if(y == 0)return 1;
  if(y == 1)return x%MOD;
  if(y%2 == 1){
    return ((x%MOD)*gen(x,y-1)%MOD)%MOD;
  }else{
    ll res = gen(x,y/2)%MOD;
    return ((res%MOD)*(res%MOD))%MOD;
  }
}

ll Factorial(ll x,ll y){ //xのy乗
  if(y == 1) return x;
  if(y == 0) return 1;
  if(y%2 == 0){
    ll res = Factorial(x,y/2);
    return res*res;
  }else{
    return x*Factorial(x,y-1);
  }

}

ll gcd(ll x, ll y){
  if(x < y) swap(x,y);
  if(y == 0) return x;
  return gcd(y,x%y);
}

ll lcm(ll x,ll y){
  ll s = gcd(x,y);
  x /= s;
  y /= s;
  return x*y*s;
}

ll maxn = 1005;
vector<vector<ll>> to(maxn*(maxn-1)/2);
vector<vector<ll>> id(maxn,vector<ll>(maxn,0));
ll toid (ll i,ll j){ //iとjの試合に対応する頂点番号を返す関数
  if(i > j)swap(i,j);
  return id[i][j];
}

int len(string s, string t){
  int dp[s.size()][t.size()];
  rep(i,s.size()) rep(j,t.size()) dp[i][j] = 0;
  ll res = 0;
  rep(i,s.size()){
    rep(j,t.size()) {
      if(s[i] == t[j]){
        if(i < 1 || j < 1){
          dp[i][j] = 1;
        }else{
          dp[i][j] = dp[i-1][j-1] + 1;
        }
      }
      res = lmax(res,dp[i][j]);
    }
  }
  return res;
}


int main(){
  string s;
  cin >> s;
  string ans = "";
  ans += s[1];
  ans += s[2];
  ans += s[0];
  cout << ans << endl;



  return 0;
}

#include<bits/stdc++.h>
#include <iostream>
#include <string>
#include <cmath>
#include <algorithm>
#include <stdlib.h>
#include <vector>
#include <set>
#include <cassert>
#include <numeric>
using namespace std;
#define rep(i,n) for(int i = 0; i < (int)n; i++)
using ll = long long;
#define ALL(a)  (a).begin(),(a).end()


int main() {
    ll N,n,ans=0,sum;
    string s;
    vector<ll> L;

    cin >> s;

    n = s.size();
    
    s = s + s[0];

    s.erase(0,1);
    


    cout << s;


}