#include <bits/stdc++.h>
using namespace std;
long long n, a[37], base[19];
long long dp[37][19][19];
char recur[37][19][19];
void recursion(long long i, long long j, long long k) {
  if (i == n) return;
  if (recur[i][j][k] == 'H') {
    cout << "H";
    recursion(i + 1, j - 1, k);
  } else {
    cout << "M";
    recursion(i + 1, j, k - 1);
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string s;
  cin >> n >> s;
  n = 2 * n;
  for (long long i = 0; i < n; i++) a[i] = s[i] - '0';
  base[0] = 1;
  for (long long i = 1; i < 19; i++) base[i] = base[i - 1] * 10;
  memset(dp, -1, sizeof(dp));
  dp[n][0][0] = 0;
  for (long long i = n; i > 0; i--) {
    long long insert = a[i - 1];
    for (long long j = 0; j <= n / 2; j++) {
      for (long long k = 0; k <= n / 2; k++) {
        if (dp[i][j][k] != -1) {
          if (dp[i][j][k] + insert * base[j] > dp[i - 1][j + 1][k]) {
            dp[i - 1][j + 1][k] = dp[i][j][k] + insert * base[j];
            recur[i - 1][j + 1][k] = 'H';
          }
          if (dp[i][j][k] + insert * base[k] > dp[i - 1][j][k + 1]) {
            dp[i - 1][j][k + 1] = dp[i][j][k] + insert * base[k];
            recur[i - 1][j][k + 1] = 'M';
          }
        }
      }
    }
  }
  recursion(0, n / 2, n / 2);
}
