#include <bits/stdc++.h>
using namespace std;
const int mxn = 2000005;
vector<long long> primes;
long long cc_size;
int vis[mxn];
void sieve() {
  for (int i = 2; i < mxn; i++) {
    if (vis[i]) continue;
    primes.push_back(i);
    for (int j = i + i; j < mxn; j += i) {
      vis[j] = 1;
    }
  }
}
vector<long long> adj[mxn];
long long cost[mxn];
long long n, m, mn = INT_MAX;
long long ans = 0;
void dfs(long long u) {
  vis[u] = 1;
  mn = min(mn, cost[u]);
  for (auto v : adj[u]) {
    if (!vis[v]) {
      dfs(v);
    }
  }
}
bool is_prime(int x) {
  if (x == 1) return false;
  for (int i = 2; i * i <= x; i++) {
    if (x % i == 0) return false;
  }
  return true;
}
int log(int n, int k) {
  int ans = 0;
  while (n > 0) {
    n /= k;
    ans++;
  }
  return ans;
}
bool cmp1(pair<long, long> x, pair<long, long> y) {
  if (x.first != y.first) return x.first < y.first;
  return x.second > y.second;
}
long long sm(long long n) {
  long long sum = 0;
  while (n != 0) {
    long long nd = n % 10;
    sum += nd;
    n /= 10;
  }
  return sum;
}
int dp[100005];
int track[11];
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  for (int i = 0; i < n; i++) {
    if (s[i] == 'L') {
      for (int j = 0; j < 10; j++) {
        if (track[j] == 0) {
          track[j] = 1;
          break;
        }
      }
    } else if (s[i] == 'R') {
      for (int j = 9; j >= 0; j--) {
        if (track[j] == 0) {
          track[j] = 1;
          break;
        }
      }
    } else
      track[s[i] - 48] = 0;
  }
  for (int i = 0; i < 10; i++) {
    cout << track[i];
  }
  cout << '\n';
  return 0;
}
