#include <bits/stdc++.h>
std::vector<bool> ComputeStatus(std::string &moves) {
  std::list<int> availableRooms = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
  for (int i = 0; i < moves.length(); i++) {
    switch (moves[i]) {
      case 'L': {
        availableRooms.pop_front();
        break;
      }
      case 'R': {
        availableRooms.pop_back();
        break;
      }
      default: {
        std::list<int>::iterator it = availableRooms.begin();
        while (it != availableRooms.end() && *it < (int)moves[i] - '0') it++;
        availableRooms.insert(it, moves[i] - '0');
      }
    }
  }
  std::vector<bool> finalStatus(10, true);
  for (int i : availableRooms) finalStatus[i] = false;
  return finalStatus;
}
int main() {
  int n;
  std::string moves;
  std::cin >> n >> moves;
  std::vector<bool> finalStatus = ComputeStatus(moves);
  for (int i = 0; i < 10; i++) std::cout << finalStatus[i];
  return 0;
}
