#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, l, r, i, id;
  string s, bs;
  while (cin >> n >> s) {
    bs = "0000000000";
    for (i = 0; i < n; i++) {
      if (s[i] == 'L') {
        for (int j = 0; j < 10; j++)
          if (bs[j] == '0') {
            bs[j] = '1';
            break;
          }
      } else if (s[i] == 'R') {
        for (int j = 9; j >= 0; j--)
          if (bs[j] == '0') {
            bs[j] = '1';
            break;
          }
      } else {
        id = s[i] - '0';
        bs[id] = '0';
        l = min(l, id);
        r = max(r, id);
      }
    }
    cout << bs << '\n';
  }
  return 0;
}
