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