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