#include <bits/stdc++.h>
using namespace std;
int n;
string s;
long long f[20][20], p[20];
string g[20][20];
pair<string, long long> ff(int a, int b) {
  if (g[a][b] != "") return make_pair(g[a][b], f[a][b]);
  if (a == 0) {
    long long S = 0;
    string T = "";
    for (int i = 2 * n - b; i < 2 * n; i++) S = S * 10 + s[i] - '0', T += "M";
    return make_pair(g[a][b] = T, f[a][b] = S);
  }
  if (b == 0) {
    long long S = 0;
    string T = "";
    for (int i = 2 * n - a; i < 2 * n; i++) S = S * 10 + s[i] - '0', T += "H";
    return make_pair(g[a][b] = T, f[a][b] = S);
  }
  pair<string, long long> S1 = ff(a - 1, b), S2 = ff(a, b - 1);
  S1.first = "H" + S1.first, S2.first = "M" + S2.first;
  S1.second += (s[n * 2 - a - b] - '0') * p[a - 1],
      S2.second += (s[n * 2 - a - b] - '0') * p[b - 1];
  if (S1.second > S2.second)
    return make_pair(g[a][b] = S1.first, f[a][b] = S1.second);
  else
    return make_pair(g[a][b] = S2.first, f[a][b] = S2.second);
}
int main() {
  cin >> n >> s;
  p[0] = 1;
  for (int i = 1; i < 18; i++) p[i] = p[i - 1] * 10;
  cout << ff(n, n).first << endl;
  return 0;
}
