#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  string s;
  cin >> n >> s;
  long long mp[10] = {0};
  for (int i = 0; i < n; i++) {
    if (s[i] == 'L') {
      for (int i = 0; i < 10; i++) {
        if (mp[i] == 0) {
          mp[i]++;
          break;
        }
      }
    } else if (s[i] == 'R') {
      for (int i = 9; i >= 0; i--) {
        if (mp[i] == 0) {
          mp[i]++;
          break;
        }
      }
    } else
      mp[stoi(s.substr(i, 1))] = 0;
  }
  for (int i = 0; i < 10; i++) cout << mp[i];
}
