#include <bits/stdc++.h>
using namespace std;
int N;
int a[10];
int main() {
  scanf("%d", &N);
  char s;
  scanf("%c", &s);
  for (register int i = 1; i <= N; i++) {
    char c;
    int p;
    scanf("%c", &c);
    if (c == 'L') {
      p = 0;
      while (a[p] != 0) p++;
      a[p] = 1;
    }
    if (c == 'R') {
      p = 9;
      while (a[p] != 0) p--;
      a[p] = 1;
    }
    if (c >= '0' && c <= '9') {
      int t = c - '0';
      a[t] = 0;
    }
  }
  for (register int i = 0; i <= 9; i++) {
    printf("%d", a[i]);
  }
  return 0;
}
