#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 7;
const int inf = INT_MAX;
const long long inff = 1e18;
const long long mod = 1e9 + 7;
int n;
string s;
int a[12];
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> s;
  for (int i = 0; i < n; i++) {
    char c = s[i];
    if (c == 'L') {
      for (int j = 0; j < 10; j++) {
        if (a[j] == 0) {
          a[j] = 1;
          break;
        }
      }
    } else if (c == 'R') {
      for (int j = 9; j >= 0; j--) {
        if (a[j] == 0) {
          a[j] = 1;
          break;
        }
      }
    } else {
      a[c - '0']--;
    }
  }
  for (int i = 0; i < 10; i++) cout << a[i];
}
