from collections import Counter S=input() C=Counter(S) ANS="" ANS+="T"*C["T"] ANS+="C"*C["C"] ANS+="P"*C["P"] print(ANS)