#include <iostream>
#include <cassert>
using namespace std;

const int K = 4;

int main() {
	int N; string s;
	cin >> N >> s;

	for (int i = 0; i < N; ++i) {
		if (s[i] == 'W') s[i] = '1';
		if (s[i] == 'R') s[i] = '2';
		if (s[i] == 'B') s[i] = '3';
	}

	int p3 = 1;
	while (p3 < N) p3 *= 3;
	p3 /= 3;

	for (; p3 >= 1; p3 /= 3) {
		while (s.size() > p3) {
			string news = "";
			for (int j = 0; j < s.size()-p3; ++j)
				news += (9 - (s[j]-'0' + s[j+p3]-'0' + 1)) % 3 + '1';
			// cout << p3 << ' ' << news << '\n';
			s = news;
		}
	}

	assert(s.size() == 1);
	if (s[0] == '1') putchar('W');
	if (s[0] == '2') putchar('R');
	if (s[0] == '3') putchar('B');
	putchar('\n');
}
#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef double db;
typedef pair <int,int> Pii;
#define reg register
#define mp make_pair
#define pb push_back
#define Mod1(x) ((x>=P)&&(x-=P))
#define Mod2(x) ((x<0)&&(x+=P))
#define rep(i,a,b) for(int i=a,i##end=b;i<=i##end;++i)
#define drep(i,a,b) for(int i=a,i##end=b;i>=i##end;--i)
template <class T> inline void cmin(T &a,T b){ ((a>b)&&(a=b)); }
template <class T> inline void cmax(T &a,T b){ ((a<b)&&(a=b)); }

char IO;
template <class T=int> T rd(){
	T s=0; int f=0;
	while(!isdigit(IO=getchar())) f|=IO=='-';
	do s=(s<<1)+(s<<3)+(IO^'0');
	while(isdigit(IO=getchar()));
	return f?-s:s;
}

const int N=1e6+10,INF=1e9+10;

int n;
char s[N];
char ch[]="BWR";

int F[N],cnt[N];
int C(int n,int m){
	if(cnt[n]-cnt[m]-cnt[n-m]) return 0;
	return F[n]*F[m]*F[n-m]%3;
}

int main(){
	rep(i,F[0]=1,N-1) {
		cnt[i]=cnt[i-1],F[i]=F[i-1];
		int x=i;
		while(x%3==0) x/=3,cnt[i]++;
		F[i]=F[i]*x%3;
	}
	n=rd(),scanf("%s",s+1);
	int sum=0;
	rep(i,1,n) {
		int t=0;
		if(s[i]=='W') t=1;
		if(s[i]=='R') t=2;
		if(~n&1) t=3-t;
		sum=(sum+C(n-1,i-1)*t)%3;
	}
	//if(~n&1) sum=n*3-sum;
	sum%=3,putchar(ch[sum]);
}





