#include <bits/stdc++.h>
using namespace std;
long long dp[22][22];
char str[44];
long long pp[22];
int ans[22][22];
int main() {
  int n;
  int i, j;
  cin >> n >> str;
  pp[n] = 1;
  for (i = n - 1; i >= 0; i--) {
    pp[i] = pp[i + 1] * 10;
  }
  memset(dp, -1, sizeof(dp));
  memset(ans, -1, sizeof(ans));
  dp[0][0] = 0;
  for (i = 0; i <= n; i++) {
    for (j = 0; j <= n; j++) {
      if (i + j == 2 * n || dp[i][j] == -1) continue;
      int num = str[i + j] - '0';
      long long t1 = dp[i][j] + num * pp[i + 1];
      if (dp[i + 1][j] == -1 || t1 > dp[i + 1][j]) {
        dp[i + 1][j] = t1;
        ans[i + 1][j] = 1;
      }
      long long t2 = dp[i][j] + num * pp[j + 1];
      if (dp[i][j + 1] == -1 || t2 > dp[i][j + 1]) {
        dp[i][j + 1] = t2;
        ans[i][j + 1] = 2;
      }
    }
  }
  i = j = n;
  string ss;
  while (i != 0 || j != 0) {
    if (ans[i][j] == 1) {
      ss += 'M';
      i--;
    }
    if (ans[i][j] == 2) {
      ss += 'H';
      j--;
    }
  }
  reverse(ss.begin(), ss.end());
  cout << ss << endl;
  return 0;
}
