#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
const int INF = (1<<30);
const ll INFLL = (1ll<<60);
const ll MOD = (ll)(1e9+7);

#define l_ength size

void mul_mod(ll& a, ll b){
	a *= b;
	a %= MOD;
}

void add_mod(ll& a, ll b){
	a = (a<MOD)?a:(a-MOD);
	b = (b<MOD)?b:(b-MOD);
	a += b;
	a = (a<MOD)?a:(a-MOD);
}

ll dp[225][225];

int main(void){
	int n,i,j;
	char c;
	cin >> n;
	dp[0][0] = 1ll;
	for(i=0; i<n; ++i){
		cin >> c;
		for(j=0; j<=n; ++j){
			if(c=='U'){
				add_mod(dp[i+1][j],dp[i][j]*j%MOD);
				if(j<n){
					add_mod(dp[i+1][j+1],dp[i][j]);
				}
			}else if(c=='D'){
				add_mod(dp[i+1][j],dp[i][j]*(j)%MOD);
				if(j>0){
					add_mod(dp[i+1][j-1],(dp[i][j]*(j)%MOD)*(j)%MOD);
				}
			}else{
				dp[i+1][j] = dp[i][j];
			}
		}
	}
	cout << dp[n][0] << endl;
	return 0;
}

