#include <bits/stdc++.h>
using namespace std;
long long parse(string s) {
  long long result = 0;
  for (int i = 0; i < s.size(); i++) {
    result = result * 10 + (s[i] - '0');
  }
  return result;
}
int main() {
  int n;
  string s;
  cin >> n >> s;
  static tuple<long long, string, string, int> v1[20], v2[20];
  for (int i = 0; i < 1 << n; i++) {
    string s1, s2, t1, t2;
    for (int j = 0; j < n; j++) {
      if (i & 1 << j) {
        s1 += s[j];
        t1 += s[j + n];
      } else {
        s2 += s[j];
        t2 += s[j + n];
      }
    }
    string temp1(s1), temp2(s2);
    temp1.resize(18, '0');
    temp2.resize(18, '0');
    long long value1 = parse(temp1) + parse(temp2);
    long long value2 = parse(t1) + parse(t2);
    int l = __builtin_popcount(i);
    if (get<0>(v1[l]) <= value1) {
      v1[l] = make_tuple(value1, s1, s2, i);
    }
    if (get<0>(v2[l]) <= value2) {
      v2[l] = make_tuple(value2, t1, t2, i);
    }
  }
  long long mx = -1;
  string ans;
  for (int i = 0; i <= n; i++) {
    string s1 = get<1>(v1[i]) + get<1>(v2[n - i]);
    string s2 = get<2>(v1[i]) + get<2>(v2[n - i]);
    long long value = parse(s1) + parse(s2);
    if (value >= mx) {
      ans = "";
      mx = value;
      for (int j = 0; j < n; j++) {
        ans += (get<3>(v1[i]) & 1 << j) ? "H" : "M";
      }
      for (int j = 0; j < n; j++) {
        ans += (get<3>(v2[n - i]) & 1 << j) ? "H" : "M";
      }
    }
  }
  cout << ans << endl;
}
