#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  string s;
  cin >> s;
  int a[10] = {0};
  for (long long int i = 0; i < n; i++) {
    if (s[i] == 'L') {
      int flag = 0;
      while (a[flag] != 0) flag++;
      a[flag] = 1;
    } else if (s[i] == 'R') {
      int flag = 9;
      while (a[flag] != 0) flag--;
      a[flag] = 1;
    } else {
      a[s[i] - '0'] = 0;
    }
  }
  for (int i = 0; i < 10; i++) cout << a[i];
  return 0;
}
