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