#include <bits/stdc++.h>
using namespace std;
template <class T>
T abs(T x) {
  return x > 0 ? x : -x;
}
int n;
int m;
string s;
int was[20][20];
unsigned long long res[20][20];
unsigned long long p[20];
unsigned long long go(int i, int j) {
  if (i + j == 2 * n) return 0;
  if (was[i][j]) return res[i][j];
  was[i][j] = 1;
  res[i][j] = 0;
  if (i < n) res[i][j] = max(res[i][j], go(i + 1, j) + p[i] * (s[i + j] - '0'));
  if (j < n) res[i][j] = max(res[i][j], go(i, j + 1) + p[j] * (s[i + j] - '0'));
  return res[i][j];
}
unsigned long long out(int i, int j) {
  if (i + j == 2 * n) return 0;
  if (i < n && res[i][j] == res[i + 1][j] + p[i] * (s[i + j] - '0')) {
    out(i + 1, j);
    printf("H");
  } else {
    out(i, j + 1);
    printf("M");
  }
  return 0;
}
int main() {
  p[0] = 1;
  for (int i = 1; i < 19; i++) p[i] = p[i - 1] * 10;
  cin >> n >> s;
  reverse((s).begin(), (s).end());
  go(0, 0);
  out(0, 0);
  return 0;
}
