#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s;
  cin >> n >> s;
  vector<bool> v(10, false);
  for (int i = 0; i < n; i++) {
    if (s[i] == 'L') {
      int j = 0;
      for (j = 0; j < 10; j++)
        if (v[j] == 0) break;
      v[j] = true;
    } else if (s[i] == 'R') {
      int j = 9;
      for (j = 9; j >= 0; j--)
        if (v[j] == 0) break;
      v[j] = true;
    } else {
      v[s[i] - '0'] = false;
    }
  }
  for (int i = 0; i < 10; i++) cout << v[i];
  cout << endl;
  return 0;
}
