#include <bits/stdc++.h>
using namespace std;
long long po(long long x, long long y) {
  if (y == 0)
    return 1;
  else
    return x * po(x, y - 1);
}
int32_t main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long n;
  cin >> n;
  long long l = 0, r = 9;
  long long dp[10]{0};
  for (long long i = 0; i < n; i++) {
    char c;
    cin >> c;
    if (c != 'L' && c != 'R') dp[c - '0'] = 0;
    if (c == 'L') {
      l = 0;
      while (dp[l]) l++;
      dp[l] = 1;
    } else if (c == 'R') {
      r = 9;
      while (dp[r]) r--;
      dp[r] = 1;
    }
  }
  for (long long i = 0; i < 10; i++) cout << dp[i];
  return 0;
}
