#include <bits/stdc++.h>
using namespace std;
long long int Find(char arr[], char x, char ch) {
  char first = 10, last = 10;
  for (long long int i = 0; i < 10; i++) {
    if (x != arr[i]) continue;
    if (first == 10) first = i;
    last = i;
  }
  if (ch == 'L')
    return first;
  else
    return last;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n;
  cin >> n;
  char str[n];
  for (long long int i = 0; i < n; i++) cin >> str[i];
  char ans[10] = {'0', '0', '0', '0', '0', '0', '0', '0', '0', '0'};
  for (long long int i = 0; i < n; i++) {
    if (str[i] == 'L') {
      ans[Find(ans, '0', 'L')] = '1';
    }
    if (str[i] == 'R') {
      ans[Find(ans, '0', 'R')] = '1';
    }
    if (str[i] >= '0' && str[i] <= '9') {
      ans[str[i] - '0'] = '0';
    }
  }
  for (long long int i = 0; i < 10; i++) {
    cout << ans[i];
  }
  return 0;
}
