#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp> // Common file
#include<ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
using namespace std;
using namespace __gnu_pbds;
#define FASTIO ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
#define ll long long
#define pb push_back
#define mp make_pair
#define pii pair<ll,ll>
#define F first
#define S second
#define ld long double
#define rep(i,a,n) for (int i = (a) ; i < (n); ++i)
#define vi vector<ll>
#define all(v) (v).begin(),(v).end()
#define M_PI 3.14159265358979323846
#define int ll
typedef tree <
pair<int, int>,
     null_type,
     less<pair<int, int>>,
     rb_tree_tag,
     tree_order_statistics_node_update > od_st; // find_by_order() and order_of_key()

const ll mod = 1e9 + 7;
const ll inf = 1e9;


void solve() {
	string s;
	cin >> s;
	char temp = s[0];
	s[0] = s[1], s[1] = s[2], s[2] = temp;
	cout << s << endl;
}


int32_t main() {
	FASTIO
	int t = 1;
	// create();
	// cin >> t;
	ll k = 1;
	while (t--) {
		// cout << "Case #" << k++ << ": ";
		solve();
	}
	return 0;
}
/*
1 1 1 1 0 0 0 0
1 1 1 0 1 0 0 0
1 1 0 1 0 1 0 0
1 0 1 0 1 0 1 0
*/


#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <utility>
#include <algorithm>
#include <cmath>
#include <climits>
#include <iomanip>
#include <queue>
#include <stack>
#include <ctype.h>

using namespace std;

typedef long long ll;

const int INF = (1<<30)-1;
const ll LINF = (1LL<<60)-1;

#define rep(i, n) for (int i = 0; i < n; i++)

template<class T> 
bool chmax(T &a, T b) {if (a < b) {a = b;return true;}else return false;}

template<class T> 
bool chmin(T &a, T b) {if (a > b) {a = b;return true;}else return false;}

//コーナーケースに気をつけろ！
int main() {
    string s;   cin >> s;
    rep(i, 3)
        cout << s[(i+1)%3];
    cout << endl;
    return 0;
}

//小数点精度
//cout << fixed << std::setprecision(15) << y << endl;