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