#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e6;
const int mod = 1e9 + 7;
const int inf = 1e9;
vector<int> arr;
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  string s;
  cin >> s;
  int room[10] = {0};
  for (int i = 0; i < n; i++) {
    if (s[i] == 'L') {
      for (int j = 0; j < 10; j++) {
        if (room[j] == 0) {
          room[j] = 1;
          break;
        }
      }
    } else if (s[i] == 'R') {
      for (int j = 9; j >= 0; j--) {
        if (room[j] == 0) {
          room[j] = 1;
          break;
        }
      }
    } else {
      int rno = s[i] - '0';
      room[rno] = 0;
    }
  }
  for (int i = 0; i < int(10); i++) cout << room[i];
  return 0;
}
