#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  vector<int> a(10);
  for (int i = 0; i < s.length(); ++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 = 9; j >= 0; j--) {
        if (a[j] == 0) {
          a[j] = 1;
          break;
        }
      }
    } else if (!isalpha(s[i])) {
      int y = s[i] - '0';
      a[y] = 0;
    }
  }
  for (int i = 0; i < 10; ++i) {
    cout << a[i];
  }
}
