#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5, M = 1e9 + 7;
int n;
string a;
long long dp[22][22], ten[22];
long long go(int lft, int rgt) {
  if (!lft && !rgt) return 0;
  long long &ret = dp[lft][rgt];
  if (ret != -1) return ret;
  ret = 0;
  if (lft)
    ret = max(ret,
              ten[lft - 1] * (a[2 * n - lft - rgt] - '0') + go(lft - 1, rgt));
  if (rgt)
    ret = max(ret,
              ten[rgt - 1] * (a[2 * n - lft - rgt] - '0') + go(lft, rgt - 1));
  return ret;
}
void path(int lft, int rgt) {
  if (!lft && !rgt) return;
  long long ret = go(lft, rgt);
  if (lft &&
      ret == ten[lft - 1] * (a[2 * n - lft - rgt] - '0') + go(lft - 1, rgt)) {
    cout << "H";
    path(lft - 1, rgt);
  } else {
    cout << "M";
    path(lft, rgt - 1);
  }
}
int main() {
  ten[0] = 1;
  for (int i = 1; i <= 18; i++) ten[i] = ten[i - 1] * 10;
  cin >> n;
  cin >> a;
  memset(dp, -1, sizeof dp);
  path(n, n);
  cout << endl;
  return 0;
}
