#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  char s[40];
  cin >> n;
  cin >> s;
  long long num[40];
  for (int i = 0; i < n + n; ++i) num[i] = s[i] - '0';
  long long dp[40][40] = {0};
  int par[40][40] = {0};
  long long ten[20];
  ten[0] = 1;
  for (int i = 1; i < 20; ++i) ten[i] = ten[i - 1] * 10L;
  for (int i = 0; i <= n; ++i) {
    for (int j = 0; j <= n; ++j) {
      long long nval;
      if (j < n) {
        nval = dp[i][j] + num[i + j] * ten[n - j - 1];
        if (j < n && nval > dp[i][j + 1]) {
          dp[i][j + 1] = nval;
          par[i][j + 1] = 0;
        }
      }
      if (i < n) {
        nval = dp[i][j] + num[i + j] * ten[n - i - 1];
        if (nval > dp[i + 1][j]) {
          dp[i + 1][j] = nval;
          par[i + 1][j] = 1;
        }
      }
    }
  }
  vector<char> ans;
  int a, b;
  a = b = n;
  while (a > 0 || b > 0) {
    if (a == 0) {
      --b;
      ans.push_back('M');
    } else if (b == 0) {
      --a;
      ans.push_back('H');
    } else if (par[a][b] == 0) {
      --b;
      ans.push_back('M');
    } else {
      --a;
      ans.push_back('H');
    }
  }
  for (int i = 0, sz = ans.size(); i < sz; ++i) cout << ans[sz - i - 1];
  return 0;
}
