#include <bits/stdc++.h>
using namespace std;
int A[2 * 19], n;
unsigned long long memo[19][19];
bool vis[19][19];
unsigned long long diez[19];
int pd[19][19];
unsigned long long DP(int p1, int p2) {
  if (p1 == n && p2 == n) return 0;
  if (p1 == n) {
    pd[p1][p2] = 2;
    return A[p1 + p2] * diez[n - p2 - 1] + DP(p1, p2 + 1);
  }
  if (p2 == n) {
    pd[p1][p2] = 1;
    return A[p1 + p2] * diez[n - p1 - 1] + DP(p1 + 1, p2);
  }
  if (vis[p1][p2]) return memo[p1][p2];
  unsigned long long maxi = 0, ans1 = 0, ans2 = 0;
  if (p1 < n) ans1 = A[p1 + p2] * diez[n - p1 - 1] + DP(p1 + 1, p2);
  if (p2 < n) ans2 = A[p1 + p2] * diez[n - p2 - 1] + DP(p1, p2 + 1);
  maxi = max(ans1, ans2);
  if (ans1 == maxi)
    pd[p1][p2] = 1;
  else
    pd[p1][p2] = 2;
  vis[p1][p2] = 1;
  return memo[p1][p2] = maxi;
}
string ans;
void rec(int p1, int p2) {
  if (p1 == n && p2 == n) return;
  if (pd[p1][p2] == 1) {
    ans.push_back('H');
    rec(p1 + 1, p2);
  } else {
    ans.push_back('M');
    rec(p1, p2 + 1);
  }
}
int main() {
  diez[0] = 1;
  for (int i = 1; i < 19; i++) diez[i] = diez[i - 1] * 10;
  while (cin >> n) {
    for (int i = 0; i < 2 * n; i++) {
      scanf("%1d", &A[i]);
    }
    memset(memo, 0, sizeof memo);
    memset(vis, 0, sizeof vis);
    DP(0, 0);
    rec(0, 0);
    cout << ans << endl;
  }
}
