#include <bits/stdc++.h>
using namespace std;
long long dp[40][40][40];
int trace[40][40][40], n;
char s[40];
long long binPow(long long x, long long y) {
  long long ans = 1;
  while (y) {
    if (y & 1) ans = ans * x;
    x = x * x;
    y = y / 2;
  }
  return ans;
}
int main() {
  scanf("%d", &n);
  scanf("%s", s + 1);
  int len = 2 * n;
  memset(dp, -1, sizeof(dp));
  dp[0][0][0] = 0;
  for (int i = 0; i < len; i++) {
    for (int j = 0; j < len; j++) {
      for (int k = 0; k < len; k++) {
        if (dp[i][j][k] != -1) {
          if (dp[i][j][k] + (s[i + 1] - '0') * binPow(10LL, n - j - 1) >
              dp[i + 1][j + 1][k]) {
            dp[i + 1][j + 1][k] =
                dp[i][j][k] + (s[i + 1] - '0') * binPow(10LL, n - j - 1);
            trace[i + 1][j + 1][k] = 0;
          }
          if (dp[i][j][k] + (s[i + 1] - '0') * binPow(10LL, n - k - 1) >
              dp[i + 1][j][k + 1]) {
            dp[i + 1][j][k + 1] =
                dp[i][j][k] + (s[i + 1] - '0') * binPow(10LL, n - k - 1);
            trace[i + 1][j][k + 1] = 1;
          }
        }
      }
    }
  }
  int pos1 = len;
  int pos2 = n;
  int pos3 = n;
  vector<char> v;
  while (pos1 > 0) {
    if (trace[pos1][pos2][pos3] == 0) {
      pos2--;
      v.push_back('M');
    } else {
      pos3--;
      v.push_back('H');
    }
    pos1--;
  }
  for (int i = (int)v.size() - 1; i >= 0; i--) printf("%c", v[i]);
  return 0;
}
