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