#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  cin >> n;
  string s;
  cin >> s;
  int m = 10;
  vector<int> res(m, 0);
  for (int i = 0; i < n; ++i) {
    if (s[i] == 'L') {
      int t = 0;
      while (true) {
        if (res[t] == 0) {
          res[t] = 1;
          break;
        }
        ++t;
        if (t >= m) {
          break;
        }
      }
    } else if (s[i] == 'R') {
      int t = m - 1;
      while (true) {
        if (res[t] == 0) {
          res[t] = 1;
          break;
        }
        --t;
        if (t < 0) {
          break;
        }
      }
    } else {
      string t{s[i]};
      int k = atoi(t.c_str());
      res[k] = 0;
    }
  }
  copy(begin(res), end(res), ostream_iterator<int>(cout, ""));
  return 0;
}
