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