#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
//#include<cctype>
#include<climits>
#include<iostream>
#include<string>
#include<vector>
#include<map>
//#include<list>
#include<queue>
#include<deque>
#include<algorithm>
//#include<numeric>
#include<utility>
//#include<memory>
#include<functional>
#include<cassert>
#include<set>
#include<stack>
#include<random>

const int dx[] = {1, 0, -1, 0};
const int dy[] = {0, -1, 0, 1};
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef pair<int, int> pii;

const int MOD = 1e9+7;
ll dp[222][222][222];

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
        int N;
    cin >> N;
    string s;
    for (int i = 0; i < N; i++) {
        char c;
        cin >> c;
        if (c != '-') s += c;
    }
    N = s.size();
    dp[0][0][0] = 1;
    for (int i = 0; i < N; i++) {
        for (int j = 0; j <= i; j++) for (int k = 0; k <= i; k++) {
            if (s[i] == 'D') {
                dp[i+1][j][k] += dp[i][j][k] * j % MOD;
                if (j > 0 && k > 0) dp[i+1][j-1][k-1] += dp[i][j][k] * j * k % MOD;
            } else {
                dp[i+1][j+1][k+1] += dp[i][j][k];
                dp[i+1][j][k] += dp[i][j][k] * k % MOD;
            }
        }
        for (int j = 0; j <= i+1; j++) for (int k = 0; k <= i+1; k++) {
            dp[i+1][j][k] %= MOD;
        }
    }
    cout << dp[N][0][0] << endl;
    return 0;
}