line = input() t = line.count('T') c = line.count('C') p = line.count('P') print(f"{'T' * t}{'C' * c}{'P' * p}")