str_0 = input()
P = str_0.count('P')
A = str_0.count('A')
T = str_0.count('T')
e = str_0.count('e')
s = str_0.count('s')
t = str_0.count('t')
while P | A | T | e | s | t:
if P != 0:
print('P', end='')
P -= 1
if A != 0:
print('A', end='')
A -= 1
if T != 0:
print('T', end='')
T -= 1
if e != 0:
print('e', end='')
e -= 1
if s != 0:
print('s', end='')
s -= 1
if t != 0:
print('t', end='')
t -= 1