#include<iostream> using namespace std; int main() { int a; cin>>a; int b=a/100; int c=(a-100*b)/10; int d=a%100; cout<<d<<c<<b; }