#include using namespace std; // #include // using mint = atcoder::modint998244353; using ld = long double; #define fi first #define se second #define all(x) x.begin(), x.end() #define rep(i,n) for(int i=0;i<(int)(n);++i) #define chmax(a,b) a=max(a,b) #define chmin(a,b) a=min(a,b) int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); string S; cin>>S; string a,b; for(char c: S){ if('a'<=c&&c<='z')a+=c; else b+=c; } reverse(all(a)); cout<