#include using namespace std; void fast_io() { ios::sync_with_stdio(false); std::cin.tie(nullptr); } int main() { fast_io(); string s; cin >> s; int r = 0; while (s[r] >= 'a' && s[r] <= 'z') r++; reverse(s.begin(), s.begin() + r); cout << s << endl; }