#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e5 + 9;
const int MAX1 = 1e6 + 9;
const double pi = acos(-1);
const long long int inf = 1e9;
const long long mod = 1e9 + 7;
bool prime[MAX];
int pfactors[MAX];
long long int fact[MAX];
long long int ifact[MAX];
long long int mexp(long long int a, long long int b) {
  long long int res = 1;
  while (b > 0) {
    if (b % 2) {
      res = (res * a);
    }
    a = (a * a);
    b = b / 2;
  }
  return res;
}
vector<int> totient() {
  long long tt[MAX];
  for (int i = 1; i < MAX; i++) tt[i] = i;
  for (int i = 2; i < MAX; i++) {
    if (tt[i] == i) {
      for (int j = i; j < MAX; j += i) {
        tt[j] /= i;
        tt[j] *= i - 1;
      }
    }
  }
  vector<int> v;
  for (int i = 1; i < MAX; i++) v.push_back(tt[i]);
  return v;
}
vector<int> seive() {
  for (int i = 2; i < MAX; i++) prime[i] = false;
  int k = 0;
  vector<int> p;
  for (int i = 2; i < MAX; i++) {
    if (!prime[i]) {
      for (int j = 2 * i; j < MAX; j += i) prime[j] = true;
    }
  }
  for (int i = 2; i < MAX; i++) {
    if (!prime[i]) p.push_back(i);
  }
  return p;
}
string s;
map<int, int> mp;
int n;
long long int dp[100][100];
int f[MAX];
int ans[MAX];
void dfs(int cur, int a, int b, long long int x) {
  if (a < 0 || b < 0) return;
  if (x > dp[a][b])
    dp[a][b] = x;
  else
    return;
  if (cur == 2 * n) {
    for (int i = 0; i < 2 * n; i++) {
      ans[i] = f[i];
    }
    return;
  }
  long long int c = 1, d = 1;
  for (int i = 0; i < a - 1; i++) c = c * 10;
  for (int i = 0; i < b - 1; i++) d = d * 10;
  f[cur] = 0;
  dfs(cur + 1, a - 1, b, x + c * (s[cur] - '0'));
  f[cur] = 1;
  dfs(cur + 1, a, b - 1, x + d * (s[cur] - '0'));
}
int main() {
  cin >> n;
  cin >> s;
  for (int i = 0; i <= 2 * n; i++) {
    for (int j = 0; j <= 2 * n; j++) dp[i][j] = -1;
  }
  for (int i = 0; i <= 2 * n; i++) {
    f[i] = -1;
    ans[i] = -1;
  }
  dfs(0, n, n, 0);
  for (int i = 0; i < 2 * n; i++) {
    if (ans[i] == 0)
      cout << 'H';
    else if (ans[i] == 1)
      cout << 'M';
  }
}
