#include using namespace std; typedef long long ll; typedef string str; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); str s; cin >> s; str p = ""; bool check = false; for (ll i = 0; i < s.size(); i++) { if (s[i] >= '0' && s[i] <= '9') { if (!check) { reverse(p.begin(), p.end()); cout << p; check = true; } cout << s[i]; } else p += s[i]; } return 0; }