#include<bits/stdc++.h>
using namespace std;int c[1000000];
int main()
{
string n;
cin>>n;
int i,j;
int m;
int t1=0,t2=0,t3=0,t4=0;
for(i=0;i<n.size();i++)
{
if(n[i]=='G'||n[i]=='g')
t1++;
if(n[i]=='P'||n[i]=='p')
t2++;
if(n[i]=='L'||n[i]=='l')
t3++;
if(n[i]=='T'||n[i]=='t')
t4++;
}
while(t1!=0||t2!=0||t3!=0||t4!=0)
{
if(t1>0)
{
cout<<"G";
t1--;
}
if(t2>0)
{
cout<<"P";
t2--;
}
if(t3>0)
{
cout<<"L";
t3--;
}
if(t4>0)
{
cout<<"T";
t4--;
}
}
return 0;
}
03-07
260
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
07-21
649
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)