h=gets.chomp.tally if h.include('C') puts 'T'*h['T']+'C'*h['C']+'P'*h['P'] else puts 'P'*h['P']+'T'*h['T'] end