s=input() a=s.count('T') b=s.count('C') c=s.count('P') print('C'*a+'T'*b+'P'*c)