/** * author: rrrriki * created: 01.04.2025 01:31:02 */ //#define USE_ACL //#define USE_BOOST #if !__INCLUDE_LEVEL__ #include #include __FILE__ signed main() { cin.tie(0); ios_base::sync_with_stdio(false); string s; cin >> s; stack st; while (s.size()) { if (isdigit(s.back())) { st.push(s.back()); s.pop_back(); } else { break; } } reverse(ALL(s)); cout << s; while (st.size()) { cout << st.top(); st.pop(); } cout << endl; return 0; } #else // clang-format off #ifdef USE_ACL #include using namespace atcoder; using mint = modint998244353; //using mint = modint1000000007; #endif #ifdef USE_BOOST #include #include #include #include #include #include #include #include #include #include #include using namespace boost::multiprecision; #endif #define ALL(x) x.begin(), x.end() #define YES cout << "Yes\n" #define NO cout << "No\n" using namespace std; #ifdef LOCAL #include "debug.h" #else #define dbg(...) 42 #endif using ll = long long; #endif /* ******* 神龜雖壽 ******* ******* 猶有竟時 ******* ******* 騰蛇乘霧 ******* ******* 終爲土灰 ******* ******* 老驥伏櫪 ******* ******* 志在千里 ******* ******* 烈士暮年 ******* ******* 壯心不已 ******* ******* 盈縮之期 ******* ******* 不但在天 ******* ******* 養怡之福 ******* ******* 可得永年 ******* ******* 幸甚至哉 ******* ******* 歌以詠志 ******* */