#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define FOR(I,A,B) for(ll I = ll(A); I < ll(B); ++I)

int main(){
  int N;
  string S;
  cin >> N >> S;
  map<char,int> ma;
  map<int,char> am;
  ma['R'] = 0; am[0] = 'R';
  ma['B'] = 1; am[1] = 'B';
  ma['W'] = 2; am[2] = 'W';

  vector<int> f(N,1),c(N,0);
  FOR(i,1,N){
    int k = i;
    while(k%3==0){
      k /= 3;
      c[i]++;
    }
    f[i] = f[i-1] * k % 3;
    c[i] += c[i-1];
  }
  int ans = 0;
  FOR(i,0,N){
    ans += f[N-1] * f[i] * f[N-1-i] * ma[S[i]] * ( (c[N-1]-c[i]-c[N-1-i]) == 0 );
    ans %= 3;
  }
  if(N%2 == 0) ans = -ans;
  ans = ( (ans % 3) + 3 ) % 3;
  cout << am[ans] << endl;
}
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
 
template<class T> ostream& operator<<(ostream &os, vector<T> V) {
 os << "[ "; for(auto v : V) os << v << " "; return os << "]";}
template<class L, class R> ostream& operator<<(ostream &os, pair<L,R> P) {
	return os << "(" << P.first << "," << P.second << ")";}
 
#define TRACE
#ifdef TRACE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
	cout << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
	const char* comma = strchr(names + 1, ',');cout.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}
#else
#define trace(...) 1
#endif
 
 
#define ll long long
#define ld long double
#define vll vector<ll>
#define pll pair<ll,ll>
#define vpll vector<pll>
#define I insert 
#define pb push_back
#define F first
#define S second
#define endl "\n"
#define vi vector<int>
#define pii pair<int, int>
#define vpii vector< pii >
 
 
const int mod=3;
inline int mul(int a,int b){return (a*1ll*b)%mod;}
inline int add(int a,int b){a+=b;if(a>=mod)a-=mod;return a;}
inline int sub(int a,int b){a-=b;if(a<0)a+=mod;return a;}
inline int power(int a,int b){int rt=1;while(b>0){if(b&1)rt=mul(rt,a);a=mul(a,a);b>>=1;}return rt;}
inline int inv(int a){return power(a,mod-2);}
inline void modadd(int &a,int &b){a+=b;if(a>=mod)a-=mod;} 

const int M = 4e5 + 12;

int cal(int x){ 
	int ret = 0;
	while(x > 0) {
		ret += x/3;
		x = x/3;
	}
	return ret;
}

int P[M]; 
int fac[M];
int ifac[M];
int red[M];

void pre() {
	fac[0] = 1;
	P[0] = 1;
	ifac[0] = 1;
	for(int i=1; i<M; i++) {
		int x = i;
		P[i] = cal(i);
		while((x%3) == 0) x/=3; 
		red[i] = x;
		fac[i] = mul(x, fac[i-1]); 
	}

	ifac[M-1] = inv(fac[M-1]);

	for(int i=M-2;i>0;i--){
		ifac[i] = mul(ifac[i+1], red[i+1]);
	}
}

int main(){
	ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);cout<<setprecision(25);
	int n; cin>>n;
	// vi c(n);
	pre();
	int ans = 0;

	for(int i=1;i<=n;i++){
		char x; cin>>x;
		int y;
		if(x=='B') y = 0;
		else if(x=='W') y = 1;
		else if(x=='R')  y = 2;
		
		int r = n - i;

		int dif = P[n-1] - P[r] - P[n-r-1];
	
		if(dif > 0) continue;

		int con = mul(fac[n-1], mul(ifac[r], ifac[n-r-1]));

		// trace(n-1, r, fac[n-1], ifac[r], ifac[n-r-1]);

		// trace(y, con, ans);

		con = mul(con, y);

		ans = add(ans, con);
	}

	if(((n-1) % 2)==1 ) ans = sub(0 , ans);

	// trace(ans);

	if( ans == 0) cout<<'B';
	else if (ans == 1) cout<<'W';
	else cout<<'R';



}