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