#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, lastLeft = -1, lastRight, left = -1, right = -1;
  cin >> n;
  lastRight = 10;
  int arr[10] = {0};
  char x;
  for (int i = 0; i < n; i++) {
    cin >> x;
    if (x == 'L') {
      int k = 0;
    z:
      if (arr[k] == 0)
        arr[k] = 1;
      else {
        k++;
        goto z;
      }
    } else if (x == 'R') {
      int y = 9;
    c:
      if (arr[y] == 0)
        arr[y] = 1;
      else {
        y--;
        goto c;
      }
    } else {
      arr[x - '0'] = 0;
    }
  }
  for (int i = 0; i < 10; ++i) {
    cout << arr[i];
  }
  return 0;
}
