#include <bits/stdc++.h>
using namespace std;

int main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr);

	int n;
	cin >> n;

	string s;
	cin >> s;

	auto reduce = [&](vector<int> &v) -> void {
		for (int i = 1; i < v.size(); i++) {
			v[i - 1] = (6 - v[i - 1] - v[i]) % 3;
		}
		v.pop_back();
	};

	vector<int> a(s.begin(), s.end());
	for (int i = 0; i < n; i++) {
		if (s[i] == 'B') a[i] = 0;
		else if (s[i] == 'W') a[i] = 1;
		else if (s[i] == 'R') a[i] = 2;
	}

	while (true) {
		while (a.size() % 3 != 1) {
			reduce(a);
		}
		if (a.size() == 1) {
			break;
		}
		vector<int> new_a;
		new_a.reserve(a.size() / 3 + 1);

		for (int i = 0; i < a.size(); i += 3) {
			new_a.push_back(a[i]);
		}
		a.swap(new_a);
	}

	if (a.front() == 0) cout << 'B' << '\n';
	else if (a.front() == 1) cout << 'W' << '\n';
	else cout << 'R' << '\n';
	return 0;
}
#include "bits/stdc++.h"
#include "ext/pb_ds/assoc_container.hpp"
#include "ext/pb_ds/tree_policy.hpp"
using namespace std;
 
#pragma GCC optimize("O3","unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC target("avx2")
 
#define sync ios_base::sync_with_stdio(0); cin.tie(0);
#define all(x) x.begin(),x.end()
#define unq(a) sort(all(a));a.resize(unique(all(a)) - a.begin())
#define ll long long
#define ld long double
#define pb push_back
#define fi first
#define se second
#define endl '\n'
//mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
mt19937 rng(1);
using pii = pair<int , int>;
 
int inline max(const int x, const int y){return (x > y ? x : y);}
int inline min(const int x, const int y){return (x < y ? x : y);}
int inline abs(const int x){return (x < 0 ? -x : x);}
const int mxn = 4e5 + 5;


const int mod = 3; // check mod!
vector<ll> fac, inv;

ll power(ll x, ll y){
    ll r = 1;
    while(y > 0){
        if (y & 1){
            r = (r * x) % mod;
        }
        y >>= 1;
        x *= x; x %= mod;
    }
    return r;
}

int main(){
 
    #ifndef ONLINE_JUDGE 
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif

    sync

    int t = 1;
    //cin >> t;
    while(t--){
      int n;
      cin >> n;
      string s;
      cin >> s;
      // bwr
      vector<int> e(n);
      for (int i = 0; i < n; i++){
        if (s[i] == 'B') e[i] = 0;
        if (s[i] == 'W') e[i] = 1;
        if (s[i] == 'R') e[i] = 2;
      }
      int sm = 0, cnt = 1;
      sm += e[0];
      int three = 0;
      for (int up, dn, i = 1; i < n; i++){
        up = (n - i); dn = i;
        while(up % 3 == 0){
          up /= 3; three++;
        }
        while(dn % 3 == 0){
          dn /= 3; three--;
        }
        cnt *= up; cnt *= power(dn, mod - 2);
        cnt %= mod;
        if (!three){
          sm += (cnt * e[i]) % mod; sm %= mod;
        }
      }
      sm *= power(2, n - 1);
      sm %= mod;
      if (sm == 0){
        cout << 'B' << endl;
      }
      else if (sm == 1){
        cout << 'W' << endl;
      }
      else{
        cout << 'R' << endl;
      }
    }
    cerr << "processor time: " << clock() / (double) CLOCKS_PER_SEC << "s    ";
    return 0;
}