#include <bits/stdc++.h>
using namespace std;
typedef unsigned long long int ll;
typedef pair<ll,ll> P;
typedef vector<ll> VI;
typedef vector<VI> VVI;
#define REP(i,n) for(int i=0;i<n;i++)
#define ALL(v) v.begin(),v.end()
constexpr ll MOD=998244353;
constexpr ll INF=1e18;

ll power(ll x, ll y){
	x%=MOD;
	ll ret=1;
	while(y){
		if(y&1) ret=ret*x%MOD;
		x=x*x%MOD;
		y>>=1;
	}
	return ret;
}
ll divid(ll x, ll y){
	x%=MOD;
	return x*power(y,MOD-2)%MOD;
}

const int MAX=510000;
ll fac[MAX], finv[MAX], inv[MAX];
void COMinit(){
	fac[0]=fac[1]=1;
	finv[0]=finv[1]=1;
	inv[1]=1;
	for (int i=2;i<MAX;i++){
		fac[i]=fac[i-1]*i%MOD;
		inv[i]=MOD-inv[MOD%i]*(MOD/i)%MOD;
		finv[i]=finv[i - 1]*inv[i]%MOD;
	}
}
ll COM(int n, int k){
	if(n<k) return 0;
	if(n<0||k<0) return 0;
	return fac[n]*(finv[k]*finv[n-k]%MOD)%MOD;
}

int main(){
	COMinit();
	int n, k; cin >> n >> k;
	VI a(n); REP(i,n) cin >> a[i];
	VVI p(k+1,VI(n,1));
	VI sump(k+1,0);
	REP(i,k){
		REP(j,n){
			p[i+1][j]=p[i][j]*a[j]%MOD;
			sump[i+1]=(sump[i+1]+p[i+1][j])%MOD;
		}
	}
	for(int i=1;i<=k;i++){
		ll ans=0;
		for(int j=0;j<=i/2;j++){
			if(j==0){
				ans=ans+sump[i]*(n-1)%MOD;
				ans%=MOD;
			}
			else if(j*2!=i){
				ans=(ans+sump[j]*sump[i-j]%MOD*COM(i,j)%MOD)%MOD;
				if(j>0)
					ans=(ans+MOD-sump[i]*COM(i,j)%MOD)%MOD;
			}
			else{
				ans=(ans+divid((power(sump[j],2)-sump[i]+MOD)*COM(i,j),2))%MOD;
			}
		}
		cout << ans << endl;
	}
	return 0;
}
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(v) (v).begin(), (v).end()
using ll = long long;
constexpr int MOD = 1000000007;

int f[400001], g[400001];

/*
    実行時Modint :
    template <int& MOD = 1000000007>
    static int MOD;
    cin >> MOD;
*/
template <int MOD = 1000000007>
struct Mint {
    int x;

    Mint() : x(0) {}
    Mint(long long t) : x(t >= 0 ? (t % MOD) : (MOD - (-t) % MOD) % MOD) {}

    Mint pow(int n) {
        Mint res(1), t(x);
        while (n > 0) {
            if (n & 1) res *= t;
            t *= t;
            n >>= 1;
        }
        return res;
    }

    Mint inv() const {
        int a = x, b = MOD, u = 1, v = 0, t;
        while (b > 0) {
            t = a / b;
            a -= t * b;
            swap(a, b);
            u -= t * v;
            swap(u, v);
        }
        return Mint(u);
    }

    Mint &operator+=(Mint a) {
        x += a.x;
        if (x >= MOD) x -= MOD;
        return *this;
    }

    Mint &operator-=(Mint a) {
        x += MOD - a.x;
        if (x >= MOD) x -= MOD;
        return *this;
    }

    Mint &operator*=(Mint a) {
        x = int(1LL * x * a.x % MOD);
        return *this;
    }

    Mint &operator/=(Mint a) {
        return (*this) *= a.inv();
    }

    Mint operator+(Mint a) const {
        return Mint(x) += a;
    }
    Mint operator-(Mint a) const {
        return Mint(x) -= a;
    }
    Mint operator*(Mint a) const {
        return Mint(x) *= a;
    }
    Mint operator/(Mint a) const {
        return Mint(x) /= a;
    }

    Mint operator-() const {
        return Mint(-x);
    }

    bool operator==(const Mint a) {
        return x == a.x;
    }
    bool operator!=(const Mint a) {
        return x != a.x;
    }
    bool operator<(const Mint a) {
        return x < a.x;
    }

    friend ostream &operator<<(ostream &os, const Mint &a) {
        return os << a.x;
    }

    friend istream &operator>>(istream &is, Mint &a) {
        int t;
        is >> t;
        a = Mint<MOD>(t);
        return (is);
    }

    int mod() {
        return MOD;
    }
};

/*
    MODint依存
    nCk mod p (p < n)
*/
template <typename T>
struct SmallModCombination {
    vector<int> f;
    vector<T> g;

    SmallModCombination(int sz) : f(sz + 1), g(sz + 1) {
        for (int i = 1; i <= sz; i++) {
            int pos = i;
            while (pos % g[0].mod() == 0) {
                pos /= g[0].mod();
                f[i]++;
            }
            g[i] = T(pos);
        }
        g[0] = T(1);
        for (int i = 1; i <= sz; i++) f[i] += f[i - 1];
        for (int i = 1; i <= sz; i++) g[i] *= g[i - 1];
    }

    T C(int n, int k) {
        if (f[n] > f[k] + f[n - k])
            return T(0);
        else
            return g[n] / (g[k] * g[n - k]);
    }
};

signed main() {
    int n;
    cin >> n;
    string c;
    cin >> c;
    map<char, Mint<3>> mp;
    mp['B'] = 0;
    mp['W'] = 1;
    mp['R'] = 2;
    SmallModCombination<Mint<3>> C(400000);
    Mint<3> ans = 0;
    rep(i, n) {
        ans += C.C(n - 1, i) * mp[c[i]];
    }
    if (n % 2 == 0) ans *= Mint<3>(-1);
    if (ans == Mint<3>(0)) {
        cout << "B" << endl;
    } else if (ans == Mint<3>(1)) {
        cout << "W" << endl;
    } else {
        cout << "R" << endl;
    }
    return 0;
}