#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
inline bool umin(T1& x, const T2& y) {
  return x > y ? x = y, true : false;
}
template <typename T1, typename T2>
inline bool umax(T1& x, const T2& y) {
  return x < y ? x = y, true : false;
}
const int N = (int)4e5 + 7;
const int mod = (int)1e9 + 7;
const int INF = (int)1e9 + 17;
const long long LLINF = (long long)1e18 + 17;
int n, m;
int a[N];
string type[N];
enum { BUY = 1, SELL = 2, UNDEFINED = 3 };
namespace tree {
int t[4 * N];
int psh[4 * N];
void push(int v) {
  if (psh[v] == 0) return;
  t[v + v] = t[v + v + 1] = psh[v];
  psh[v + v] = psh[v + v + 1] = psh[v];
  psh[v] = 0;
}
void modify(int v, int l, int r, int x, int tl, int tr) {
  if (r < tl || tr < l) return;
  if (l <= tl && tr <= r) {
    t[v] = x;
    psh[v] = x;
    return;
  }
  push(v);
  int tm = (tl + tr) / 2;
  modify(v + v, l, r, x, tl, tm);
  modify(v + v + 1, l, r, x, tm + 1, tr);
}
int getval(int v, int p, int tl, int tr) {
  if (tl == tr) return t[v];
  push(v);
  int tm = (tl + tr) / 2;
  if (p <= tm) return getval(v + v, p, tl, tm);
  return getval(v + v + 1, p, tm + 1, tr);
}
}  // namespace tree
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr), cout.tie(nullptr);
  cin >> n;
  vector<int> ord;
  set<int> current;
  for (int i = (0); i < (n); ++i) {
    cin >> type[i] >> a[i];
    ord.push_back(a[i]);
  }
  sort((ord).begin(), (ord).end());
  ord.erase(unique((ord).begin(), (ord).end()), ord.end());
  for (int i = (0); i < (n); ++i) {
    a[i] = lower_bound((ord).begin(), (ord).end(), a[i]) - ord.begin();
  }
  long long answer = 1;
  for (int i = (0); i < (n); ++i) {
    if (type[i] == "ADD") {
      current.insert(a[i]);
      auto nxt = current.upper_bound(a[i]);
      auto prv = current.lower_bound(a[i]);
      int nxtId = (nxt == current.end() ? -1 : *nxt);
      int prvId = (prv == current.begin() ? -1 : *prev(prv));
      int nxtType =
          (nxtId == -1 ? UNDEFINED : tree::getval(1, nxtId, 0, n - 1));
      int prvType =
          (prvId == -1 ? UNDEFINED : tree::getval(1, prvId, 0, n - 1));
      int currentType = (nxtType == prvType ? nxtType : UNDEFINED);
      if (nxtType == BUY) currentType = BUY;
      if (prvType == SELL) currentType = SELL;
      tree::modify(1, a[i], a[i], currentType, 0, n - 1);
    }
    if (type[i] == "ACCEPT") {
      auto nxt = current.upper_bound(a[i]);
      auto prv = current.lower_bound(a[i]);
      int nxtId = (nxt == current.end() ? -1 : *nxt);
      int prvId = (prv == current.begin() ? -1 : *prev(prv));
      int nxtType =
          (nxtId == -1 ? UNDEFINED : tree::getval(1, nxtId, 0, n - 1));
      int prvType =
          (prvId == -1 ? UNDEFINED : tree::getval(1, prvId, 0, n - 1));
      if (prvType == SELL || nxtType == BUY) {
        cout << 0 << endl;
        return 0;
      }
      int tp = tree::getval(1, a[i], 0, n - 1);
      if (tp == UNDEFINED) {
        answer <<= 1;
        answer %= mod;
      }
      current.erase(a[i]);
      if (prvId != -1) {
        tree::modify(1, 0, prvId, BUY, 0, n - 1);
      }
      if (nxtId != -1) {
        tree::modify(1, nxtId, n - 1, SELL, 0, n - 1);
      }
    }
  }
  int cnt = 0;
  for (int x : current) {
    int tp = tree::getval(1, x, 0, n - 1);
    cnt += (tp == UNDEFINED);
  }
  cout << (answer * (cnt + 1)) % mod << endl;
  return 0;
}
