#include <bits/stdc++.h>
int num[20];
int n;
int main() {
  memset(num, 0, sizeof(num));
  scanf("%d", &n);
  getchar();
  for (int i = 0; i < n; i++) {
    int x;
    char c;
    scanf("%c", &c);
    if (c <= '9') {
      x = c - '0';
      num[x] = 0;
    } else if (c == 'L') {
      for (int i = 0; i <= 9; i++) {
        if (num[i] == 0) {
          num[i] = 1;
          break;
        }
      }
    } else {
      for (int i = 9; i >= 0; i--) {
        if (num[i] == 0) {
          num[i] = 1;
          break;
        }
      }
    }
  }
  for (int i = 0; i <= 9; i++) printf("%d", num[i]);
  return 0;
}
