#include <bits/stdc++.h>
using namespace std;
int n, p[37][19];
string s, ans;
long long dp[37][19], po[19];
long long f(int i, int j) {
  if (i == 2 * n) return 0;
  if (dp[i][j] != -1) return dp[i][j];
  if (j < n) {
    dp[i][j] = f(i + 1, j + 1) + (s[i] - '0') * po[n - j - 1];
    p[i][j] = 0;
  }
  if (i - j < n) {
    long long k = f(i + 1, j) + (s[i] - '0') * po[n - (i - j) - 1];
    if (k > dp[i][j]) {
      dp[i][j] = k;
      p[i][j] = 1;
    }
  }
  return dp[i][j];
}
int main() {
  cin >> n >> s;
  po[0] = 1;
  for (int i = 1; i < 19; i++) po[i] = po[i - 1] * 10ll;
  memset(dp, -1, sizeof dp);
  f(0, 0);
  int i = 0, j = 0;
  while (i != 2 * n) {
    if (p[i][j] == 0) {
      ans += "H";
      i++;
      j++;
    } else {
      ans += "M";
      i++;
    }
  }
  cout << ans << endl;
  return 0;
}
