#include<iostream>
#include<algorithm>
#include<vector>
#include<map>
#include<string>


long long  INF=1000000000000000000;
long long mod=1000000007;
using namespace std;


long long stair(int N){
long long i=1;
for(int k=2;k<=N;k++){
    i*=k;
    if(i>mod){
        i%=mod;
    }
}
return i;

}

int main(){
int N;
cin>>N;
string s;
cin>>s;
char white='W';
char black='B';
if(s[0]==white || s[2*N-1]==white){
    cout<<"0"<<endl;
    return 0;
}


bool LorR[2*N];

LorR[0]=false;//L=false,R=trueとする


for(int i=1;i<2*N;i++){
    if(s[i-1]==s[i]){
        LorR[i]=!LorR[i-1];
    }
    else{
        LorR[i]=LorR[i-1];
    }
}
int countL[2*N+1];//Lの個数の累積和
int countR[2*N+1];//Lの個数の累積和
countL[0]=0;
countR[0]=0;
for(int i=0;i<2*N;i++){
    if(LorR[i]){
        countR[i+1]=countR[i]+1;
        countL[i+1]=countL[i];
    }
    else{
        countR[i+1]=countR[i];
        countL[i+1]=countL[i]+1;   
    }
}

if(countL[2*N]!=countR[2*N]){
    cout<<"0"<<endl;
    return 0;
}
long long ans=1;
for(int i=1;i<=2*N;i++){
    if(LorR[i-1]){
        if(countL[i]<countR[i]){
           cout<<"0"<<endl;
            return 0;
        }
        ans*=(countL[i]-countR[i-1]);
    }

    if(ans>mod){
        ans%=mod;
    }
}
//順列なのでnの階乗をかける
ans=(ans*stair(N))%mod;

cout<<ans<<endl;
 return 0;
}
#include <bits/stdc++.h>

using namespace std;
using i64 = std::int_fast64_t;

const int MOD = 1000000007;

template <typename T>
ostream &operator<<(ostream &os, const std::vector<T> &vec) {
  for (const auto &e : vec) os << e << (&e == &vec.back() ? "\n" : " ");
  return os;
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int H, W, K;
  cin >> H >> W >> K;

  vector<vector<i64>> dp(H + 1, vector<i64>(W + 1, 0));
  dp[0][0] = 1;
  for (int h = 0; h < H; h++) {
    for (int w = 0; w < W; w++) {
      for (int bit = 0; bit < (1 << (W - 1)); bit++) {
        auto check = [bit, W]() -> bool {
          for (int b = 0; b < W - 2; b++) {
            if ((bit >> b) & 1 && (bit >> (b + 1)) & 1) return false;
          }
          return true;
        };

        if (!check()) continue;

        int nw = w;
        if ((bit >> w) & 1) {
          nw++;
        } else if (w > 0 && (bit >> (w - 1)) & 1) {
          nw--;
        }

        dp[h + 1][nw] = (dp[h + 1][nw] + dp[h][w]) % MOD;
      }
    }
  }

  cout << dp[H][K - 1] << '\n';
  return 0;
}
