#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 5;
int ans[10];
int main() {
  int n;
  string a;
  cin >> n >> a;
  for (int i = 0; i < n; i++) {
    if (a[i] == 'L') {
      for (int j = 0; j <= 9; j++) {
        if (ans[j] == 0) {
          ans[j] = 1;
          break;
        }
      }
    } else if (a[i] == 'R') {
      for (int j = 9; j >= 0; j--) {
        if (ans[j] == 0) {
          ans[j] = 1;
          break;
        }
      }
    } else {
      ans[a[i] - '0'] = 0;
    }
  }
  for (int i = 0; i < 10; i++) cout << ans[i];
}
