#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long dx[] = {-1, 0, 1, 0};
long long dy[] = {0, -1, 0, 1};
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  vector<long long> v(10, 0);
  while (t--) {
    char c;
    cin >> c;
    if (c == 'L') {
      for (long long i = 0; i <= 9; i++) {
        if (v[i] == 0) {
          v[i] = 1;
          break;
        }
      }
    } else if (c == 'R') {
      for (long long i = 9; i >= 0; i--) {
        if (v[i] == 0) {
          v[i] = 1;
          break;
        }
      }
    } else {
      long long k = c - '0';
      v[k] = 0;
    }
  }
  for (long long i = 0; i < 10; i++) cout << v[i];
}
