#include <bits/stdc++.h>
char str[39];
long long int dp[37][19][19];
int bt[37][19][19];
int n;
long long int serc(int x, int a, int b) {
  if (a > n || b > n) return -1e18;
  if (x == -1) {
    if (a != b) {
      return -1e18;
    }
    return 0;
  }
  if (dp[x][a][b] != -1) return dp[x][a][b];
  dp[x][a][b] = -1e18;
  long long int po;
  if (a + 1 <= n) {
    po = 1;
    for (int i = 0; i < a; i++) {
      po *= 10;
    }
    long long int tmp = serc(x - 1, a + 1, b) + po * (str[x] - '0');
    if (tmp > dp[x][a][b]) {
      dp[x][a][b] = tmp;
      bt[x][a][b] = 1;
    }
  }
  if (b + 1 <= n) {
    po = 1;
    for (int i = 0; i < b; i++) {
      po *= 10;
    }
    long long int tmp = serc(x - 1, a, b + 1) + po * (str[x] - '0');
    if (tmp > dp[x][a][b]) {
      dp[x][a][b] = tmp;
      bt[x][a][b] = 2;
    }
  }
  return dp[x][a][b];
}
void backtrack(int x, int a, int b) {
  if (x < 0) return;
  if (bt[x][a][b] == 1) {
    backtrack(x - 1, a + 1, b);
    printf("M");
  } else {
    backtrack(x - 1, a, b + 1);
    printf("H");
  }
}
int main() {
  scanf("%d", &n);
  scanf("%s", str);
  for (int i = 0; i < 2 * n; i++) {
    for (int j = 0; j <= n; j++) {
      for (int k = 0; k <= n; k++) {
        dp[i][j][k] = -1;
      }
    }
  }
  serc(n * 2 - 1, 0, 0);
  backtrack(n * 2 - 1, 0, 0);
  printf("\n");
  return 0;
}
