#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
 
 
 
char colorOnTop(char c0, char c1) {
  if (c0 == c1) return c0;
  if (c0 == 'W' && c1 == 'B') return 'R';
  if (c0 == 'W' && c1 == 'R') return 'B';
  if (c0 == 'B' && c1 == 'W') return 'R';
  if (c0 == 'B' && c1 == 'R') return 'W';
  if (c0 == 'R' && c1 == 'W') return 'B';
  if (c0 == 'R' && c1 == 'B') return 'W';
  return 'A';
}
 
char getTopColor(int n, string s) {
  if (n == 1) return s[0];
 
  int k = 1;
  while (3 * k < n) k *= 3;
 
  string ns = "";
  for (int i = 0; i + k < n; i++) ns += colorOnTop(s[i], s[i + k]);
  return getTopColor(n - k, ns);
}
 
int main() {
  //fast_io();
 
  int n;
  string s;
  cin >> n >> s;
  cout << getTopColor(n, s);
}
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef long long ll;
template<class T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
template<class A> ostream& operator<<(ostream &cout, vector<A> const &v) {cout << "["; for(int i = 0; i < v.size(); i++) {if (i) cout << ", "; cout << v[i];} return cout << "]";};
template<class A, class B> ostream& operator<<(ostream &cout, const pair<A,B> &x) {return cout << "(" <<x.first << ", " << x.second << ")";};
template<class T> void pv(T a, T b) {cerr << "["; for (T i = a; i != b; ++i) {if (i != a) cerr << ", "; cerr << *i;}cerr << "]\n";}
void _print() {cerr << "]\n";}
template<class T, class... V> void _print(T t, V... v) {cerr << t; if (sizeof...(v)) cerr << ", "; _print(v...);}
#define debug(x...) cerr << "[" << #x << "] = [", _print(x)
#define fi first
#define se second
#define SZ(x) (int)((x).size())
#define pii pair<int,int>
#define uid(x,y) uniform_int_distribution<int>(x,y)(rng)
int vp[400005], fa[400005];
int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    int n;
    string s;
    cin >> n >> s;
    vp[0] = 0;
    fa[0] = 1;
    for (int q = 1; q < 400005; q++) {
        vp[q] = vp[q-1];
        fa[q] = fa[q-1];
        int qq = q;
        while (qq % 3 == 0) {
            vp[q]++;
            qq /= 3;
        }
        fa[q] = (fa[q]*qq)%3;
    }
    int tot = 0;
    for (int q = 0; q < n; q++) {
        //B = 0, R = 1, W = 2
        int x = 0;
        if (s[q] > 'B') x++;
        if (s[q] > 'R') x++;
        if (vp[n-1] == vp[q]+vp[n-1-q]) tot += x*fa[n-1]*fa[q]*fa[n-1-q];
    }
    tot = ((tot%3)+3)%3;
    if (n % 2 == 0) tot = (3-tot)%3;
    if (tot == 0) cout << "B\n";
    else if (tot == 1) cout << "R\n";
    else cout << "W\n";
    return 0;
}


