def Main(): s=input() print("T"*s.count("T"),end="") print("C"*s.count("C"),end="") print("P"*s.count("P")) Main()