#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-12;
const int INF = 1 << 30;
const long long LINF = 1ll << 61;
const int BUFFER_SZ = 1 << 20;
const int MOD = 1000 * 1000 * 1000 + 7;
char BUFFER[BUFFER_SZ];
int gi() {
  int x;
  scanf("%d", &x);
  return x;
}
double gd() {
  double x;
  scanf("%lf", &x);
  return x;
}
long long gll() {
  long long x;
  scanf("%lld", &x);
  return x;
}
vector<int> gvi(int n) {
  vector<int> a;
  while (n-- > 0) a.push_back(gi());
  return a;
}
string gs() {
  scanf("%s", BUFFER);
  return string(BUFFER);
}
template <class T>
void print(vector<T> &x, string format) {
  format += "%c";
  for (int i = 0; i < x.size(); ++i)
    printf(format.c_str(), x[i], i + 1 == x.size() ? '\n' : ' ');
}
long long P10[111];
map<pair<int, int>, pair<long long, int>> go(vector<int> a, int isLeft) {
  map<pair<int, int>, pair<long long, int>> res;
  int n = a.size();
  for (int m = 0; m < 1 << a.size(); ++m) {
    long long s1 = 0;
    long long s2 = 0;
    int c1 = 0;
    int c2 = 0;
    for (int i = 0; i < a.size(); ++i) {
      if (m >> i & 1) {
        s2 = 10ll * s2 + a[i];
        c2++;
      } else {
        s1 = 10ll * s1 + a[i];
        ++c1;
      }
    }
    if (isLeft) {
      s1 *= P10[n - c1];
      s2 *= P10[n - c2];
    }
    if (!res.count(make_pair(c1, c2)) ||
        res[make_pair(c1, c2)].first < s1 + s2) {
      res[make_pair(c1, c2)] = make_pair(s1 + s2, m);
    }
  }
  return res;
};
void solve() {
  P10[0] = 1;
  for (int i = 1; i < 100; ++i) P10[i] = 10ll * P10[i - 1];
  int n = gi();
  string s = gs();
  map<pair<int, int>, pair<long long, int>> L;
  map<pair<int, int>, pair<long long, int>> R;
  vector<int> a;
  vector<int> b;
  for (int i = 0; i < s.size(); ++i) {
    if (i < n)
      a.push_back(s[i] - '0');
    else
      b.push_back(s[i] - '0');
  }
  L = go(a, 1);
  R = go(b, 0);
  int m1, m2;
  long long best = -1;
  for (int i = 0; i <= n; ++i) {
    for (int j = 0; j <= n; ++j) {
      if (i + j == n) {
        long long v =
            L[make_pair(i, j)].first + R[make_pair(n - i, n - j)].first;
        if (v > best) {
          best = v;
          m1 = L[make_pair(i, j)].second;
          m2 = R[make_pair(n - i, n - j)].second;
        }
      }
    }
  }
  for (int i = 0; i < n; ++i) {
    if (m1 >> i & 1)
      printf("H");
    else
      printf("M");
  }
  for (int i = 0; i < n; ++i) {
    if (m2 >> i & 1)
      printf("H");
    else
      printf("M");
  }
  printf("\n");
}
int main() {
  solve();
  return 0;
}
