#include <bits/stdc++.h>
using namespace std;
int ans[10];
int l, r, n;
string str;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  cin >> str;
  l = 0;
  r = 9;
  for (int i = 0; i < n; i++) {
    if (str[i] == 'L') {
      l = 0;
      while (ans[l]) l++;
      ans[l] = 1;
    } else if (str[i] == 'R') {
      r = 9;
      while (ans[r]) r--;
      ans[r] = 1;
    } else
      ans[str[i] - '0'] = 0;
  }
  for (int i = 0; i < 10; i++) cout << ans[i];
  cout << endl;
  return 0;
}
