#include <iostream> #include <string> #include <iomanip> #include <cmath> using namespace std; int main() { int a; cin >> a; int sum; while (a>0) { sum = a%10; a = a / 10; cout << sum; } }