#include <bits/stdc++.h>
long long dp[40][20];
int last[40][20];
void update(int t, int x, int y, long long v) {
  if (dp[x][y] < v) {
    dp[x][y] = v;
    last[x][y] = t;
  }
}
int main(void) {
  int n;
  char s[105];
  long long w[20];
  w[0] = 1;
  for (int i = 1; i <= 19; i++) w[i] = w[i - 1] * 10;
  memset(dp, -1, sizeof(dp));
  dp[0][0] = 0;
  scanf("%d", &n);
  scanf("%s", s);
  for (int i = 0; i < 2 * n; i++) {
    for (int j = 0; j <= n; j++) {
      int len1 = j, len2 = i - j;
      if (len2 < 0) continue;
      if (len1 < len2) {
        update(1, i + 1, j + 1, dp[i][j] + w[len2 - len1 - 1] * (s[i] - '0'));
        update(0, i + 1, j, dp[i][j] * 10 + (s[i] - '0'));
      } else if (len1 > len2) {
        update(1, i + 1, j + 1, dp[i][j] * 10 + (s[i] - '0'));
        update(0, i + 1, j, dp[i][j] + w[len1 - len2 - 1] * (s[i] - '0'));
      } else {
        update(1, i + 1, j + 1, dp[i][j] * 10 + (s[i] - '0'));
        update(0, i + 1, j, dp[i][j] * 10 + (s[i] - '0'));
      }
    }
  }
  int x = 2 * n, y = n;
  while (x > 0) {
    if (last[x][y] == 0) {
      s[x - 1] = 'M';
      --x;
    } else {
      s[x - 1] = 'H';
      --x;
      --y;
    }
  }
  puts(s);
  return 0;
}
