#include <bits/stdc++.h>
using namespace std;
const long long MX = 50;
long long n;
long long arr[MX], P[MX];
long long dp[MX][MX];
long long calc(long long x, long long y) {
  if (x == n && y == n) return 0;
  long long &ret = dp[x][y];
  if (ret != -1) return ret;
  long long pos = x + y + 1;
  ret = 0;
  if (x != n) {
    ret = arr[pos] * P[n - x - 1] + calc(x + 1, y);
  }
  if (y != n) {
    ret = max(ret, arr[pos] * P[n - y - 1] + calc(x, y + 1));
  }
  return ret;
}
string sol;
void find_sol(long long x, long long y) {
  if (x == n && y == n) return;
  long long ret = dp[x][y];
  long long pos = x + y + 1;
  if (x != n) {
    if (ret == arr[pos] * P[n - x - 1] + calc(x + 1, y)) {
      sol.push_back('H');
      find_sol(x + 1, y);
      return;
    }
  }
  if (y != n) {
    if (ret == arr[pos] * P[n - y - 1] + calc(x, y + 1)) {
      sol.push_back('M');
      find_sol(x, y + 1);
      return;
    }
  }
}
int main() {
  memset(dp, -1, sizeof(dp));
  P[0] = 1;
  for (long long j = 1; j < 20; j++) P[j] = P[j - 1] * 10;
  cin >> n;
  for (long long j = 1; j <= n * 2; j++) {
    char cmd;
    cin >> cmd;
    arr[j] = cmd - '0';
  }
  calc(0, 0);
  find_sol(0, 0);
  cout << sol << endl;
}
