#include <bits/stdc++.h>
using namespace std;
const int maxn = 0;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  char res[12];
  memset(res, '0', sizeof(res));
  ;
  res[10] = '\0';
  int l = 0, r = 9;
  for (int i = 0; i < n; i++) {
    while (res[l] != '0') l++;
    while (res[r] != '0') r--;
    if (s[i] == 'L') {
      res[l] = '1';
      l++;
    } else if (s[i] == 'R') {
      res[r] = '1';
      r--;
    } else {
      int x = s[i] - '0';
      res[x] = '0';
      if (x >= r) r = x;
      if (x <= l) l = x;
    }
  }
  cout << res << endl;
  return 0;
}
