import std.stdio;
import std.conv;
import std.string;
import std.typecons;
import std.algorithm;
import std.array;
import std.range;
import std.math;
import std.regex : regex;
import std.container;
import std.bigint;
import std.numeric;


void main()
{
  immutable mod = 1_000_000_000 + 7;

  auto n = readln.chomp.to!int;
  auto s = readln.chomp.to!(char[]).map!(a=>a=='W'?1:0).array;
  
  if (s[0] + s[$-1]) {
    writeln("0");
    return;
  }

  long b = 1;
  foreach (i; 2..n+1) {
    b = (b * i) % mod;
  }

  auto f = new bool[](2 * n);
  long res;

  void calc(int l, int cnt) {
    if (l == 2 * n && cnt == n) {
      if (s.sum == 2 * n) {
        res++;
      } 

      return;
    }

    if (f[l]) {
      if (s[l] == 1) {
        calc(l+1, cnt);
      } else {
        return;
      }
    }

    if (s[l] == 1) {
      return;
    }

    foreach (i; l+1..2*n) {
      if (f[i]) continue;

      f[i] = 1;
      foreach (j; l..i+1) {
        s[j] ^= 1;
      }
      calc(l+1, cnt+1);
      f[i] = 0;
      foreach (j; l..i+1) {
        s[j] ^= 1;
      }
    }
  }

  calc(0, 0);

  writeln((res * b) % mod);
}
