#include <bits/stdc++.h>
using namespace std;
long long int po[20], val[40], p2[40];
pair<long long int, long long int> dp[20][20];
pair<long long int, long long int> fun(int i, int x, int y, int n) {
  if (i == 2 * n) return make_pair(0, 0);
  pair<long long int, long long int> p, q;
  if (dp[x][y].first >= 0) return dp[x][y];
  if (x == n + 1) {
    p = fun(i + 1, x, y + 1, n);
    dp[x][y] =
        make_pair(po[n - y] * val[i] + p.first, p2[2 * n - 1 - i] + p.second);
    return dp[x][y];
  }
  if (y == n + 1) {
    p = fun(i + 1, x + 1, y, n);
    dp[x][y] = make_pair(po[n - x] * val[i] + p.first, p.second);
    return dp[x][y];
  } else {
    p = fun(i + 1, x + 1, y, n);
    q = fun(i + 1, x, y + 1, n);
    if (po[n - x] * val[i] + p.first >= po[n - y] * val[i] + q.first)
      dp[x][y] = make_pair(po[n - x] * val[i] + p.first, p.second);
    else
      dp[x][y] =
          make_pair(po[n - y] * val[i] + q.first, p2[2 * n - 1 - i] + q.second);
    return dp[x][y];
  }
}
int main() {
  int i, j, n;
  po[0] = 1, p2[0] = 1;
  for (i = 1; i < 20; i++) {
    po[i] = 10 * po[i - 1];
    for (j = 1; j < 20; j++) dp[i][j].first = -1;
  }
  cin >> n;
  string str;
  cin >> str;
  for (i = 1; i < 40; i++) p2[i] = 2 * p2[i - 1];
  for (i = 0; i < 2 * n; i++) val[i] = str[i] - 48;
  long long int x;
  x = fun(1, 2, 1, n).second;
  j = 0;
  vector<int> pr(2 * n, 0);
  while (x > 0) pr[j] = x % 2, x /= 2, j++;
  for (i = 2 * n - 1; i >= 0; i--) {
    if (pr[i])
      cout << "M";
    else
      cout << "H";
  }
  cout << endl;
}
