#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<algorithm>
#include<cmath>
#include<queue>
#include<list>
#include<vector>
using namespace std;
const int maxn=210;
char str[maxn];
int main()
{
int n,i,j,k;
while(scanf("%d",&n)!=EOF){
scanf("%s",str);
int r=0,g=0,b=0;
int len=strlen(str);
for(i=0;i<len;++i){
if(str[i]=='R')r++;
else if(str[i]=='G')g++;
else b++;
}
if(r!=0&&g==0&&b==0){
printf("R\n");
}
else if(r==0&&g!=0&&b==0){
printf("G\n");
}
else if(r==0&&g==0&&b!=0){
printf("B\n");
}
else if(len==2){
if(r==1&&g==1)printf("B\n");
else if(r==1&&b==1)printf("G\n");
else if(g==1&&b==1)printf("R\n");
}
else if(r!=0&&g!=0&&b!=0){
printf("BGR\n");
}
else if(r==0){
if(g>b){
if(b==1)
printf("BR\n");
else printf("BGR\n");
}
else if(g<b){
if(g==1)
printf("GR\n");
else printf("BGR\n");
}
else printf("BGR\n");
}
else if(g==0){
if(r>b){
if(b==1)
printf("BG\n");
else printf("BGR\n");
}
else if(r<b){
if(r==1)
printf("GR\n");
else printf("BGR\n");
}
else printf("BGR\n");
}
else if(b==0){
if(r>g){
if(g==1)
printf("BG\n");
else printf("BGR\n");
}
else if(r<g){
if(r==1)
printf("BR\n");
else printf("BGR\n");
}
else printf("BGR\n");
}
}
return 0;
}
8VC Venture Cup 2016 - Elimination RoundB. Cards
最新推荐文章于 2019-11-08 16:30:04 发布