#include <bits/stdc++.h>
using namespace std;
long long n;
string s;
long long dp[20][20], p[20];
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> s;
  p[1] = 1;
  for (int i = 2; i <= n; i++) {
    p[i] = p[i - 1] * 10;
  }
  for (int i = 0; i <= n; i++) {
    for (int j = 0; j <= n; j++) {
      long long val = s[n * 2 - i - j] - '0';
      if (i) dp[i][j] = dp[i - 1][j] + val * p[i];
      if (j) dp[i][j] = max(dp[i][j], dp[i][j - 1] + val * p[j]);
    }
  }
  long long i = n, j = n;
  string res = "";
  while (i || j) {
    long long val = s[n * 2 - i - j] - '0';
    if (i && dp[i][j] == dp[i - 1][j] + val * p[i]) {
      res += "H";
      i--;
    } else {
      res += "M";
      j--;
    }
  }
  cout << res;
}
