m=input()
res={"Z":0,"O":0,"J":0}
for i in range(len(m)):
if m[i]=="Z":
res["Z"]+=1
if m[i]=="O":
res["O"]+=1
if m[i]=="J":
res["J"]+=1
ans=""
while res["J"]>0 or res["Z"]>0 or res["O"]>0:
if res["Z"]>0:
ans+="Z"
res["Z"]-=1
if res["O"]>0:
ans+="O"
res["O"]-=1
if res["J"]>0:
ans+="J"
res["J"]-=1
print(ans)

京公网安备 11010502036488号