#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string s;
  int n;
  cin >> n;
  cin >> s;
  int arr[10];
  memset(arr, 0, sizeof(arr));
  for (int i = 0; i < n; i++) {
    if (s[i] == 'L') {
      for (int j = 0; j < 10; j++) {
        if (arr[j] == 0) {
          arr[j] = 1;
          break;
        }
      }
    } else if (s[i] == 'R') {
      for (int j = 9; j >= 0; j--) {
        if (arr[j] == 0) {
          arr[j] = 1;
          break;
        }
      }
    } else {
      arr[s[i] - '0'] = 0;
    }
  }
  for (int i = 0; i < 10; i++) cout << arr[i];
}
