#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  bool arr[10];
  char x;
  for (int i = 0; i < 10; i++) {
    arr[i] = 0;
  }
  for (int i = 0; i < n; i++) {
    cin >> x;
    if (x != 'L' and x != 'R') {
      arr[x - '0'] = 0;
    } else if (x == 'L') {
      int j = 0;
      while (arr[j] == 1) {
        j++;
      }
      arr[j] = 1;
    } else if (x == 'R') {
      int j = 9;
      while (arr[j] == 1) {
        j--;
      }
      arr[j] = 1;
    }
  }
  for (int i = 0; i < 10; i++) {
    cout << arr[i];
  }
  return 0;
}
