#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 2;
void solve() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  vector<int> v(10);
  int left = 0;
  int right = 9;
  for (int i = 0; i < n; i++) {
    if (s[i] == 'L') {
      while (left <= 9 && v[left] != 0) left++;
      v[left]++;
    } else if (s[i] == 'R') {
      while (right >= 0 && v[right] != 0) right--;
      v[right]++;
    } else {
      int roomNo = s[i] - '0';
      v[roomNo]--;
      right = max(right, roomNo);
      left = min(left, roomNo);
    }
  }
  for (int i = 0; i < 10; i++) {
    cout << v[i];
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
