#include <bits/stdc++.h>
using namespace std;
int main() {
  int s[10] = {0};
  int n;
  scanf("%d", &n);
  char c;
  int lt = 0, rt = 9;
  for (int i = 0; i < n; i++) {
    cin >> c;
    if (c == 'L') {
      while (s[lt] != 0) lt++;
      s[lt] = 1;
      lt++;
    } else if (c == 'R') {
      while (s[rt] != 0) rt--;
      s[rt] = 1;
      rt--;
    } else {
      int m = c - '0';
      s[m] = 0;
      lt = min(lt, m);
      rt = max(rt, m);
    }
  }
  for (int i = 0; i < 10; i++) printf("%d", s[i]);
}
