#include <bits/stdc++.h>
using namespace std;
const int MX = 2e9;
const long long MX2 = 3e18;
const double pi = acos(-1);
int main() {
  cin.tie(0);
  cout.tie(0);
  ios::sync_with_stdio(0);
  int n;
  cin >> n;
  int i, j;
  string str;
  cin >> str;
  int p[20] = {};
  for (i = 0; i < n; i++) {
    if (str[i] == 'L') {
      for (j = 0; j < 10; j++)
        if (!p[j]) {
          p[j] = 1;
          break;
        }
    } else if (str[i] == 'R') {
      for (j = 9; j >= 0; j--)
        if (!p[j]) {
          p[j] = 1;
          break;
        }
    } else {
      p[str[i] - '0'] = 0;
    }
  }
  for (j = 0; j < 10; j++) cout << p[j];
  return 0;
}
