#include <bits/stdc++.h>
using namespace std;
const int maxn = 100 + 10;
int main() {
  int n, d = 0, r = 0;
  cin >> n;
  string str;
  cin >> str;
  for (int i = 0; i < n + n; i++) {
    if (str[i] == 'D') {
      d++, r--;
      if (r < 0) str += 'D';
    } else {
      r++, d--;
      if (d < 0) str += 'R';
    }
  }
  cout << *str.rbegin() << endl;
  return 0;
}
