#include <bits/stdc++.h>
using namespace std;
long long n, a[42], f[21][21], g[21][21];
long long ten[21];
char ch, ans[42];
int main() {
  cin >> n;
  for (int i = 1; i <= 2 * n; i++) {
    cin >> ch;
    a[i] = ch - 48;
  }
  ten[0] = 1;
  for (int i = 1; i <= n; i++) ten[i] = ten[i - 1] * 10;
  for (int i = 0; i <= n; i++) {
    for (int j = 0; j <= n; j++) {
      if ((i == 0) && (j == 0)) continue;
      if (i > 0) {
        f[i][j] = f[i - 1][j] + (a[i + j]) * (ten[n - i]);
        g[i][j] = 1;
      }
      if (j > 0) {
        long long temp = f[i][j - 1] + (a[i + j]) * (ten[n - j]);
        if (temp > f[i][j]) {
          f[i][j] = temp;
          g[i][j] = 2;
        }
      }
    }
  }
  int i = n, j = n;
  while ((i + j) != 0) {
    if (g[i][j] == 1) {
      ans[i + j] = 'H';
      i = i - 1;
    } else {
      ans[i + j] = 'M';
      j = j - 1;
    }
  }
  for (i = 1; i <= 2 * n; i++) cout << ans[i];
  cout << endl;
  return 0;
}
