#include <bits/stdc++.h>
using namespace std;
int main() {
  long num;
  cin >> num;
  char A[100000];
  for (int i = 0; i < num; i++) {
    cin >> A[i];
  }
  int R[10];
  for (int i = 0; i < 10; i++) {
    R[i] = 0;
  }
  int j = 0, k = 9;
  for (int i = 0; i < num; i++) {
    if (A[i] == 'L') {
      for (int j = 0; j <= 9; j++) {
        if (R[j] == 0) {
          R[j] = 1;
          break;
        }
      }
    } else if (A[i] == 'R') {
      for (int k = 9; k >= 0; k--) {
        if (R[k] == 0) {
          R[k] = 1;
          break;
        }
      }
    } else {
      char s = A[i];
      int p = (int)s - 48;
      R[p] = 0;
    }
  }
  for (int i = 0; i < 10; i++) {
    cout << R[i];
  }
  return 0;
}
