#include<cstdio>
using namespace std;
typedef long long ll;

ll n, x[200], dp[2][201][201], mod = 1000000007;

int main() {
  scanf("%lld", &n);
  char s[10]; ll m = 0;
  for (ll i = 0; i < n; i++) {
    scanf("%s", s);
    if (s[0] == 'U') x[m++] = 1;
    else if (s[0] == 'D') x[m++] = 0;
  }
  if (m == 0) {
    printf("1\n");
    return 0;
  }
  if (x[0] == 0) {
    printf("0\n");
    return 0;
  }
  dp[0][1][1] = 1;
  for (ll i = 1; i < m; i++) {
    if (x[i] == 1) {
      for (ll j = 1; j <= i+1; j++) {
        for (ll k = 1; k <= i+1; k++) {
          dp[i&1][j][k] = (dp[!(i&1)][j-1][k-1] + dp[!(i&1)][j][k] * k) % mod;
        }
      }
    } else {
      for (ll j = 0; j < i+1; j++) {
        for (ll k = 0; k < i+1; k++) {
          dp[i&1][j][k] = (dp[!(i&1)][j][k] * j + dp[!(i&1)][j+1][k+1] * (j + 1) * (k + 1)) % mod;
        }
      }
    }
    for (ll j = 0; j <= m; j++) {
      for (ll k = 0; k <= m; k++) {
        dp[!(i&1)][j][k] = 0;
      }
    }
  }
  printf("%lld\n", dp[!(m&1)][0][0]);
}

