#include <bits/stdc++.h>
#define ll long long
using namespace std;
template <typename T>
void read(T &x) {
	x = 0; char c = getchar(); int f = 0;
	for (; !isdigit(c); c = getchar())
		f |= c == '-';
	for (; isdigit(c); c = getchar())
		x = x * 10 + (c ^ '0');
	if (f) x = -x;
}
template <typename T>
void write(T x, char ed = '\n') {
	if (x < 0) putchar('-'), x = -x;
	static short st[30], tp;
	do st[++tp] = x % 10, x /= 10; while (x);
	while (tp) putchar(st[tp--] | '0');
	putchar(ed);
}

const int N = 1005000;
int ans, n;
char s[N];
inline int C(int n, int m) {
	if (m > n) return 0;
	if (n >= 3) return C(n / 3, m / 3) * C(n % 3, m % 3) % 3;
	if (n == 2) return 1 + (m == 1);
	return 1;
}

int main() {
	read(n), scanf ("%s", s + 1);
	for (int i = 1;i <= n; ++i) {
		int c = (s[i] > 'B') + (s[i] > 'R');
		ans += C(n - 1, i - 1) * c;
	}	
	if (~n & 1) ans *= -1;
	ans = (ans % 3 + 3) % 3;
	if (ans == 0) putchar('B');
	else if (ans == 1) putchar('R');
	else putchar('W');
	return 0;
}

#include <bits/stdc++.h>
//#include <atcoder/all>
using namespace std;
//using namespace atcoder;
using ll=long long;
using ld=long double;
using pll=pair<ll, ll>;
//using mint = modint1000000007;
#define rep(i,n) for (ll i=0; i<n; ++i)
#define all(c) begin(c),end(c)
#define PI acos(-1)
#define oo 2e18
template<typename T1, typename T2>
bool chmax(T1 &a,T2 b){if(a<b){a=b;return true;}else return false;}
template<typename T1, typename T2>
bool chmin(T1 &a,T2 b){if(a>b){a=b;return true;}else return false;}
//priority_queue<ll, vector<ll>, greater<ll>> Q;
/*

*/

char add_wbr(char a, char b){
  if (a==b) return(a);
  if (a=='W' && b=='R') return('B');
  if (a=='W' && b=='B') return('R');
  if (a=='B' && b=='W') return('R');
  if (a=='B' && b=='R') return('W');
  if (a=='R' && b=='W') return('B');
  if (a=='R' && b=='B') return('W');
  return (0);
}

int main(){
  cin.tie(0);
  ios::sync_with_stdio(0);
  cout << fixed << setprecision(10);
  ll N;
  string S;
  cin >> N >> S;
  ll sz=S.size();
  while (sz>1){ // 4->1, 5->4->1
    while(sz%3!=1){
      string T;
      for(ll j=0; j<sz-1; j++)
        T+=add_wbr(S[j], S[j+1]);
      S=T;
      sz=S.size();
    }
    string T;
    for(ll j=0; j+3<sz; j+=3)
      T+=add_wbr(S[j], S[j+3]);
    if (T[0]) S=T;
    sz=S.size();
  }
  cout << S[0] << endl;
}
