#include <bits/stdc++.h>
using namespace std;
long long dp[20][20];
bool dir[20][20];
string s;
long long getdp(long long a, long long b, long long mul1, long long mul2,
                long long index) {
  long long x, y;
  if (dp[a][b] != -1) return dp[a][b];
  x = -1;
  y = -1;
  if (a >= 1)
    x = getdp(a - 1, b, mul1 / 10, mul2, index + 1) + (s[index] - '0') * mul1;
  if (b >= 1)
    y = getdp(a, b - 1, mul1, mul2 / 10, index + 1) + (s[index] - '0') * mul2;
  if (x > y) {
    dp[a][b] = x;
    dir[a][b] = 1;
  } else {
    dp[a][b] = y;
    dir[a][b] = 0;
  }
  return dp[a][b];
}
int main() {
  long long n, i, j, mul1, mul2, len;
  while (cin >> n) {
    cin >> s;
    for (i = 0; i < 20; i++)
      for (j = 0; j < 20; j++) dp[i][j] = -1;
    dp[0][0] = 0;
    mul1 = mul2 = 1;
    for (i = 1; i < n; i++) mul1 *= 10, mul2 *= 10;
    getdp(n, n, mul1, mul2, 0);
    i = n;
    j = n;
    while (i != 0 || j != 0) {
      if (dir[i][j]) {
        i--;
        cout << "M";
      } else {
        j--;
        cout << "H";
      }
    }
    cout << endl;
  }
  return 0;
}
