#include <iostream>
#include <vector>
#include <utility>
#include <queue>
#include <vector>
#include <list>
#include <cmath>
#include <map>
#include <deque>
#include <utility>
#include <climits>
#include <unordered_map>
#include <unordered_set>
#include <cstdlib>
#include <string>
#include <stack>
#include <set>
#include <functional>
#include <iterator>
#include <algorithm>

using namespace std;

typedef long long ll;


class UnionFind {
private:
    vector<int> f;
    int _components;
public:
    explicit UnionFind(int sz): f(sz), _components(sz) {
        for (int i = 0; i < sz; i++) {
            f[i] = i;
        }
    }

    int find(int x) {
        if (x == f[x]) return x;
        int fa = f[x];
        return f[x] = find(fa);
    }

    void add(int x, int y) {
        int fx = find(x), fy = find(y);
        if (fx != fy) {
            _components--;
        }
        f[fx] = fy;
    }
    int components() const {
        return _components;
    }
};

ll gcd(ll a, ll b) {
    if (b == 0)return a;
    else return gcd(b, a%b);
}

ll lucas(ll n, ll m, ll mod, const vector<vector<ll>>& c) {
    if (m == 0) {
        return 1;
    } else {
        return c[n % mod][m % mod] * lucas(n / mod, m / mod, mod, c);
    }
}



int main(int argc, char *argv[]) {
    std::ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);

    const int mod = 1e9+7;
    int n;
    cin >> n;
    string s;
    cin >> s;

    unordered_map<char, int> dict{{'B', 0}, {'W', 1,}, {'R', 2}};
    unordered_map<char, int> reversedict{{0, 'B'}, {1, 'W'}, {2, 'R'}};

    vector<vector<ll>> c(3, vector<ll>(3, 0));
    c[0][0] = 1;
    c[1][0] = 1;
    c[1][1] = 1;
    c[2][0] = 1;
    c[2][1] = 2;
    c[2][2] = 1;


    int sum = 0;
    for (int i = 0; i < n; i++) {
        ll mult = lucas(n - 1, i, 3, c);
        //cout << mult << ' ';
        sum += mult * dict[s[i]];
        sum %= 3;
    }
    if (n % 2 == 0) {
        sum = -sum;
    }

    sum %= 3;
    if (sum < 0) {
        sum += 3;
    }
    cout << char(reversedict[sum]);
}
#include <bits/stdc++.h>
using namespace std;

#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define eb emplace_back
typedef long long ll;
typedef pair<int, int> pi;

const int maxn = 4e5 + 5;
int n;
int f[maxn], g[maxn];
string a;

int C(int i, int j){
    if(f[i] == f[j] + f[i-j])
        return g[i] * g[j] * g[i-j] % 3;
    else
        return 0;
}

string col = "BWR";

int id(char c){
    for(int i = 0;i < 3;i++){
        if(c == col[i])
            return i;
    }
}

int main(){
    ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    cin >> n;
    f[0] = 0;
    g[0] = 1;
    for(int i = 1;i <= n;i++){
        int c = 0;
        int j = i;
        while(j % 3 == 0){
            j /= 3;
            c++;
        }
        f[i] = f[i-1] + c;
        g[i] = g[i-1] * j % 3;
    }
    cin >> a;
    int ans = 0;
    for(int i = 0;i < n;i++){
        ans += C(n-1, i) * id(a[i]); 
    }
    ans %= 3;
    if(n % 2 == 0){
        ans = (3 - ans) % 3; 
    }
    cout << col[ans] << endl;
    return 0;
}
