s=gets.chomp.chars t=s.count("T") c=s.count("C") p=s.count("P") puts "T"*t+"C"*c+"P"*p