#include <bits/stdc++.h>
using namespace std;
bool arr[10] = {false};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  string s;
  int l = 0, r = 9;
  cin >> s >> s;
  for (int x = 0; x < s.length(); x++) {
    if (s[x] == 'L') {
      arr[l] = true;
      while (arr[l] == 1) {
        l++;
        if (l >= 10) {
          l = 11;
          break;
        }
      }
    } else if (s[x] == 'R') {
      arr[r] = true;
      while (arr[r] == true) {
        r--;
        if (r < 0) {
          r = -1;
          break;
        }
      }
    } else {
      arr[s[x] - '0'] = false;
      l = min(l, s[x] - '0');
      r = max(r, s[x] - '0');
    }
    if (arr[r] == true) r = -1;
    if (arr[l] == true) l = 11;
  }
  for (int x = 0; x < 10; x++) {
    cout << arr[x];
  }
  return 0;
}
