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