#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  char c;
  cin >> n;
  int ans[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
  while (n--) {
    cin >> c;
    if (c == 'L') {
      for (int i = 0; i < 10; i++) {
        if (!ans[i]) {
          ans[i] = 1;
          break;
        }
      }
    } else if (c == 'R') {
      for (int i = 9; i >= 0; i--) {
        if (!ans[i]) {
          ans[i] = 1;
          break;
        }
      }
    } else
      ans[c - '0'] = 0;
  }
  for (int i = 0; i < 10; i++) {
    cout << ans[i];
  }
}
