#include using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define ll long long #define mod 998244353 int main(){ cin.tie(0)->sync_with_stdio(0); cout.tie(0); string S; cin>>S; int C=0,P=0,T=0; rep(i,S.size()){ if(S.at(i)=='C') C++; if(S.at(i)=='P') P++; if(S.at(i)=='T') T++; } if(C==0){ rep(i,P) cout<<"P"; rep(i,T) cout<<"T"; return 0; } rep(i,T) cout<<"T"; rep(i,C) cout<<"C"; rep(i,P) cout<<"P"; }