#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
using int64 = long long int;
template <typename T>
void chmax(T &a, T b) {
  a = max(a, b);
}
template <typename T>
void chmin(T &a, T b) {
  a = min(a, b);
}
template <typename T>
void chadd(T &a, T b) {
  a = a + b;
}
int dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};
const ll INF = 1001001001001001LL;
const ll MOD = 1000000007LL;
int main() {
  int N;
  scanf("%d", &N);
  string s;
  cin >> s;
  vector<int> room(10);
  for (auto c : s) {
    if (c == 'L') {
      for (int i = 0; i < 10; i++) {
        if (room[i] == 0) {
          room[i] = 1;
          break;
        }
      }
    } else if (c == 'R') {
      for (int i = 9; i >= 0; i--) {
        if (room[i] == 0) {
          room[i] = 1;
          break;
        }
      }
    } else {
      int n = c - '0';
      room[n] = 0;
    }
  }
  string ans = "";
  for (auto e : room) ans += (char)('0' + e);
  cout << ans << endl;
  return 0;
}
