#include <bits/stdc++.h>
using namespace std;
int fu(vector<int> v) {
  int i;
  for (i = 0; i < 10; i++) {
    if (v[i] == 0) return i;
  }
  return i;
}
int ru(vector<int> v) {
  int i;
  for (i = 9; i >= 0; i--) {
    if (v[i] == 0) return i;
  }
  return i;
}
int main() {
  int n, k, i, ch = 0, ch1 = 9;
  cin >> n;
  string a;
  cin >> a;
  int a1 = 0, ch2 = 0;
  vector<int> ans(10, 0);
  for (i = 0; i < n; i++) {
    if (a[i] == 'L') {
      ans[ch] = 1;
      ch = fu(ans);
    } else if (a[i] == 'R') {
      ans[ch1] = 1;
      ch1 = ru(ans);
    } else if (isdigit((int)a[i])) {
      int ch2 = (int)a[i] - 48;
      ans[ch2] = 0;
      ch = fu(ans);
      ch1 = ru(ans);
    }
  }
  for (i = 0; i < 10; i++) cout << ans[i];
}
