#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n;
  cin >> n;
  string s;
  cin >> s;
  long long int arr[10] = {0};
  long long int li = 0, ri = 9;
  for (long long int i = 0; i < n; i++) {
    if (s[i] == 'L') {
      arr[li] = 1;
      li++;
    }
    if (s[i] == 'R') {
      arr[ri] = 1;
      ri--;
    }
    if (isdigit(s[i])) {
      int xs = s[i] - 48;
      arr[xs] = 0;
    }
    for (long long int ij = 0; ij <= 9; ij++) {
      if (arr[ij] == 0) {
        li = ij;
        break;
      }
    }
    for (long long int ij = 9; ij >= 0; ij--) {
      if (arr[ij] == 0) {
        ri = ij;
        break;
      }
    }
  }
  for (long long int ij = 0; ij <= 9; ij++) {
    cout << arr[ij] << "";
  }
}
