![](https://img.laitimes.com/img/_0nNw4CM6IyYiwiM6ICdiwiIyVGduV2QvwVe0lmdhJ3ZvwFM38CXlZHbvN3cpR2Lc1TPB10QGtWUCpEMJ9CXsxWam9CXwADNvwVZ6l2c052bm9CXUJDT1wkNhVzLcRnbvZ2Lc5mUyoFcGJTY2Z1MaZXUYpVd1kmYr50MZV3YyI2cKJDT29GRjBjUIF2LcRHelR3LcJzLctmch1mclRXY39zM4gjMxkTNwIjMxMDM3EDMy8CX0Vmbu4GZzNmLn9Gbi1yZtl2Lc9CX6MHc0RHaiojIsJye.jpg)
//AC
#include <iostream>
#include <cstdlib>
#include <stdio.h>
#include <algorithm>
#include <math.h>
#include <string.h>
#include <queue>
#include <stack>
#include <vector>
#include <map>
#include <set>
typedef long long ll;
using namespace std;
int main(){
string s;
int G,P,L,T;
cin>>s;
G=P=L=T=0;
for (int i=0;i<=s.size() ; i++) {
if(s[i]=='G'||s[i]=='g'){
G++;
}
if(s[i]=='P'||s[i]=='p'){
P++;
}
if(s[i]=='L'||s[i]=='l'){
L++;
}
if(s[i]=='T'||s[i]=='t'){
T++;
}
}
while(G>0||P>0||L>0||T>0){
if(G>0){cout<<"G";G--;}
if(P>0){cout<<"P";P--;}
if(L>0){cout<<"L";L--;}
if(T>0){cout<<"T";T--;}
}
cout<<endl;
return 0;
}