#include <bits/stdc++.h>
using namespace std;
template <typename T>
T gcd(T a, T b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
template <typename T>
T pow(T a, T b, long long m) {
  T ans = 1;
  while (b > 0) {
    if (b % 2 == 1) ans = ((ans % m) * (a % m)) % m;
    b /= 2;
    a = ((a % m) * (a % m)) % m;
  }
  return ans % m;
}
string s;
long long pw[22];
int n;
long long dp[45][20][20];
long long solve(int id, int cnt1, int cnt2) {
  if (cnt1 == n && cnt2 == n) return 0;
  long long ans = 0;
  if (dp[id][cnt1][cnt2] != -1) return dp[id][cnt1][cnt2];
  if (cnt1 == n) {
    ans = max(ans,
              (s[id] - '0') * pw[n - 1 - cnt2] + solve(id + 1, cnt1, cnt2 + 1));
  } else if (cnt2 == n) {
    ans = max(ans,
              (s[id] - '0') * pw[n - 1 - cnt1] + solve(id + 1, cnt1 + 1, cnt2));
  } else {
    ans = max(ans,
              (s[id] - '0') * pw[n - 1 - cnt2] + solve(id + 1, cnt1, cnt2 + 1));
    ans = max(ans,
              (s[id] - '0') * pw[n - 1 - cnt1] + solve(id + 1, cnt1 + 1, cnt2));
  }
  return dp[id][cnt1][cnt2] = ans;
}
void print(int id, int cnt1, int cnt2) {
  if (cnt1 == n && cnt2 == n)
    return;
  else if (cnt1 == n) {
    cout << "M";
    print(id + 1, cnt1, cnt2 + 1);
  } else if (cnt2 == n) {
    cout << "H";
    print(id + 1, cnt1 + 1, cnt2);
  } else {
    if (dp[id][cnt1][cnt2] ==
        (s[id] - '0') * pw[n - 1 - cnt2] + solve(id + 1, cnt1, cnt2 + 1)) {
      cout << "M";
      print(id + 1, cnt1, cnt2 + 1);
    } else if (dp[id][cnt1][cnt2] == (s[id] - '0') * pw[n - 1 - cnt1] +
                                         solve(id + 1, cnt1 + 1, cnt2)) {
      cout << "H";
      print(id + 1, cnt1 + 1, cnt2);
    }
  }
}
int main() {
  cin >> n;
  pw[0] = 1;
  cin >> s;
  memset(dp, -1, sizeof dp);
  for (int i = 1; i <= 18; i++) {
    pw[i] = pw[i - 1] * 10;
  }
  solve(0, 0, 0);
  print(0, 0, 0);
}
