#include <bits/stdc++.h>
using namespace std;
int n;
char s[105];
unsigned long long power10[105], F[105][105];
int read() {
  char c = getchar();
  int ans = 0;
  while (c < '0' || c > '9') c = getchar();
  while (c >= '0' && c <= '9')
    ans = (ans << 1) + (ans << 3) + (c ^ 48), c = getchar();
  return ans;
}
void DFS(int x, int y) {
  if (x > n + n) return;
  if (y && F[x][y] == F[x + 1][y - 1] + power10[y] * (s[x] ^ 48))
    putchar('H'), DFS(x + 1, y - 1);
  else
    putchar('M'), DFS(x + 1, y);
  return;
}
int main() {
  n = read();
  scanf("%s", s + 1);
  power10[0] = 1;
  for (register int i = 1; i <= n + n; i++) power10[i] = power10[i - 1] * 10;
  for (register int i = n + n; i >= 1; i--)
    for (register int j = 0; j <= n + n - i + 1; j++) {
      int jj = n + n - i + 1 - j;
      if (j) F[i][j] = max(F[i][j], F[i + 1][j - 1] + power10[j] * (s[i] ^ 48));
      if (jj) F[i][j] = max(F[i][j], F[i + 1][j] + power10[jj] * (s[i] ^ 48));
    }
  DFS(1, n);
  return 0;
}
