#include <bits/stdc++.h>
const long long INF = (1LL << 60);
int n;
char str[37], ans[19][19][37];
long long dp[19][19], TEN[19];
long long getDP(int a, int b) {
  if (dp[a][b] != -1) {
    return dp[a][b];
  } else if (a == 0 && b == 0) {
    return dp[a][b] = 0;
  }
  int p = 2 * n - a - b;
  long long t1 = -INF, t2 = -INF;
  if (a >= 1) {
    t1 = (str[p] - '0') * TEN[a - 1] + getDP(a - 1, b);
  }
  if (b >= 1) {
    t2 = (str[p] - '0') * TEN[b - 1] + getDP(a, b - 1);
  }
  if (t1 > t2) {
    ans[a][b][p] = 'H';
    strcpy(ans[a][b] + p + 1, ans[a - 1][b] + p + 1);
    return dp[a][b] = t1;
  } else {
    ans[a][b][p] = 'M';
    strcpy(ans[a][b] + p + 1, ans[a][b - 1] + p + 1);
    return dp[a][b] = t2;
  }
}
int main() {
  TEN[0] = 1;
  for (int i = 1; i < 19; i++) {
    TEN[i] = TEN[i - 1] * 10;
  }
  while (scanf("%d", &n) != EOF) {
    scanf("%s", str);
    memset(dp, -1, sizeof(dp));
    memset(ans, 0, sizeof(ans));
    long long mx = getDP(n, n);
    puts(ans[n][n]);
  }
  return 0;
}
