#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int arr[10] = {0};
  char S[100001];
  cin >> S;
  for (int i = 0; S[i]; i++) {
    int j = 0;
    if (S[i] == 'L') {
      while (arr[j] == 1) j++;
      arr[j] = 1;
    }
    j = 10 - 1;
    if (S[i] == 'R') {
      while (arr[j] == 1) j--;
      arr[j] = 1;
    }
    if (S[i] >= 48 && S[i] <= 57) {
      arr[S[i] - 48] = 0;
    }
  }
  for (int i = 0; i < 10; i++) cout << arr[i];
  cout << endl;
}
