// coded by zeffy
#pragma GCC optimize("O3","unroll-loops","omit-frame-pointer","inline") //Optimization flags
#pragma GCC option("arch=native","tune=native","no-zeroupper") //Enable AVX
#pragma GCC target("avx","popcnt")  //Enable AVX
#include <x86intrin.h> //SSE Extensions
#include <bits/stdc++.h> 
using namespace std;
#define eb emplace_back
#define mp make_pair
#define hello cout<<"hello"<<"\n"
#define forr(i,a,b) for(int i=a;i<b;i++)
#define it(s)	for(auto itr:s)
#define dvg(s) 	for(auto itr:s)	cout<<itr<<" ";cout<<endl;
#define dbg(s)	cout<<#s<<"= "<<s<<endl;
typedef long long int lli;
typedef unsigned long long int ulli;
const lli INF=(lli)1e17+5;
const ulli MOD=1e9+7;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    std::cout<< std::fixed;
    std::cout.precision(6);
    
  	string s;
	cin>>s;
	forr(i,1,s.size()) cout<<s[i];
	cout<<s[0];

    
		
	
	
    
    
    

    return 0;
}





















#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <queue>

using namespace std;
typedef long long ll;


int main(){
  int L;
  cin >> L;
  L = L - 1;
  ll div = 11*10*9*8*7*6*5*4*3*2;
  ll ans = L;
  for(int i=1;i<11;i++){
    ans = ans*(L-i)/(i+1);
    //cout << ans << endl;
  }
  cout << ans << endl;
}
