#include <bits/stdc++.h>
using namespace std;
const long long lol = 1001;
long long n;
string event;
long long room[10];
inline void input() {
  cin >> n;
  cin >> event;
}
inline void debug() {}
inline void guest(char side) {
  if (side == 'L') {
    for (long long i = 0; i < 10; i++) {
      if (room[i] == 0) {
        room[i] = 1;
        break;
      }
    }
  } else {
    for (long long i = 9; i > -1; i--) {
      if (room[i] == 0) {
        room[i] = 1;
        break;
      }
    }
  }
}
inline void solve() {
  for (long long i = 0; i < n; i++) {
    if (event[i] == 'L')
      guest('L');
    else if (event[i] == 'R')
      guest('R');
    else
      room[(long long)event[i] - 48] = 0;
  }
  for (long long i = 0; i < 10; i++) cout << room[i];
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  input();
  solve();
}
