#include <bits/stdc++.h>
using namespace std;
long long dp[20][20];
int path[20][20];
long long f[20];
void DFS(int x, int y) {
  if (path[x][y] == -1) return;
  if (path[x][y] == 1) {
    DFS(x - 1, y);
    cout << "H";
  }
  if (path[x][y] == 2) {
    DFS(x, y - 1);
    cout << "M";
  }
}
int main() {
  int n;
  char str[100];
  while (cin >> n >> str) {
    f[n] = 1;
    for (int i = n - 1; i >= 0; i--) f[i] = f[i + 1] * 10;
    memset(dp, -1, sizeof(dp));
    dp[0][0] = 0;
    for (int i = 0; i <= n; i++) {
      for (int j = 0; j <= n; j++) {
        if (i + j == 2 * n) continue;
        int u = str[i + j] - '0';
        if (dp[i][j] + f[i + 1] * u > dp[i + 1][j]) {
          dp[i + 1][j] = dp[i][j] + f[i + 1] * u;
          path[i + 1][j] = 1;
        }
        if (dp[i][j] + f[j + 1] * u > dp[i][j + 1]) {
          dp[i][j + 1] = dp[i][j] + f[j + 1] * u;
          path[i][j + 1] = 2;
        }
      }
    }
    path[0][0] = -1;
    DFS(n, n);
    cout << endl;
  }
  return 0;
}
