#include<bits/stdc++.h> using namespace std; int main(){ int n,g; cin>>n; g=n%10; n/=10; cout<<g<<n; return 0; }