#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j;
  cin >> n;
  string s;
  cin >> s;
  int l = s.length();
  int a[10] = {0};
  for (i = 0; i < l; i++) {
    if (s[i] == 'L')
      for (j = 0; j < 10; j++)
        if (a[j] == 0) {
          a[j] = 1;
          break;
        }
    if (s[i] == 'R')
      for (j = 9; j >= 0; j--)
        if (a[j] == 0) {
          a[j] = 1;
          break;
        }
    if (s[i] >= 48 || s[i] <= 57) {
      int num = s[i] - 48;
      a[num] = 0;
    }
  }
  for (i = 0; i < 10; i++) cout << a[i];
  return 0;
}
