#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vl = vector<ll>;
using vvl = vector<vl>;
using vb = vector<bool>;
using vs = vector<string>;
using pll = pair<ll, ll>;
const ll oo = 0x3f3f3f3f3f3f3f3fLL;
const double eps = 1e-9;
int main() {
  cin.sync_with_stdio(0);
  vb r;
  r.resize(10);
  ll n;
  cin >> n;
  for (ll i = (0); i < (n); i++) {
    char c;
    cin >> c;
    switch (c) {
      case 'L':
        for (ll j = (0); j < (10); j++) {
          if (!r[j]) {
            r[j] = true;
            break;
          }
        }
        break;
      case 'R':
        for (ll j = ll(10) - 1; j >= (0); j--) {
          if (!r[j]) {
            r[j] = true;
            break;
          }
        }
        break;
      default:
        r[c - '0'] = false;
    }
  }
  for (ll i = (0); i < (10); i++) {
    cout << (r[i] ? 1 : 0);
  }
}
