s=input() t=s.count('T') c=s.count('C') p=s.count('P') print('T'*t+'C'*c+'P'*p)