#include using namespace std; using ll = long long; #define rep(i, s, e) for (int i = (int)(s); i < (int)(e); ++i) #define all(a) (a).begin(),(a).end() int main() { cin.tie(nullptr); ios_base::sync_with_stdio(false); string S; cin >> S; int ind = -1; rep(i, 0, S.size()) { if ('0' <= S[i] && S[i] <= '9') { ind = i - 1; break; } } for (int i = ind; i >= 0; --i) cout << S[i]; rep(i, ind + 1, S.size()) cout << S[i]; cout << '\n'; }