from collections import Counter tcp="TCP" s=input() if "C" not in s: print("".join(sorted(s))) exit() sc = Counter(s) for ch in tcp: print(ch*sc[ch],end="")