#include <bits/stdc++.h>
using namespace std;
inline void read(int &res) {
  register int g = 1;
  register char ch = getchar();
  res = 0;
  while (!isdigit(ch)) {
    if (ch == '-') g = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    res = (res << 3) + (res << 1) + (ch ^ 48);
    ;
    ch = getchar();
  }
  res *= g;
}
char c[101000];
int n, m, v[20];
int main() {
  read(n);
  scanf("%s", c + 1);
  for (register int i = 1; i <= n; i++) {
    if (c[i] == 'L') {
      for (register int j = 1; j <= 10; j++) {
        if (!v[j]) {
          v[j] = 1;
          break;
        }
      }
    } else if (c[i] == 'R') {
      for (register int j = 10; j >= 1; j--) {
        if (!v[j]) {
          v[j] = 1;
          break;
        }
      }
    } else {
      m = c[i] - '0' + 1;
      v[m] = 0;
    }
  }
  for (register int i = 1; i <= 10; i++) {
    cout << v[i];
  }
  return 0;
}
