#include //#include using namespace std; //using namespace atcoder; using ll = long long; //using mint = modint998244353; int main(){ cin.tie(nullptr); ios_base::sync_with_stdio(false); string S, T="", U=""; cin >> S; for (auto c : S){ if ('0' <= c && c <= '9') U += c; else T += c; } for (auto c : views::reverse(T)) cout << c; cout << U << endl; return 0; }