#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  queue<long long> qR, qD;
  string second;
  cin >> second;
  for (int i = 0; i < second.length(); i++) {
    if (second[i] == 'R')
      qR.push(i);
    else
      qD.push(i);
  }
  while (1) {
    if (qD.empty()) {
      cout << "R" << endl;
      break;
    }
    if (qR.empty()) {
      cout << "D" << endl;
      break;
    }
    if (qD.front() > qR.front()) {
      qD.pop();
      int x = qR.front();
      qR.pop();
      qR.push(x + n);
    } else {
      qR.pop();
      int x = qD.front();
      qD.pop();
      qD.push(x + n);
    }
  }
  return 0;
}
