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