#include <bits/stdc++.h>
using namespace std;
long long dp[20][20];
int p[20][20];
long long e10[19];
const int H = 1, M = 2;
int main() {
  {
    if (fopen("input.txt", "r")) {
      freopen("input.txt", "r", stdin);
      freopen("output.txt", "w", stdout);
    }
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
  }
  int n;
  cin >> n;
  string s;
  cin >> s;
  vector<int> a(s.size());
  for (int i = 0; i != 2 * n; ++i) a[i] = s[i] - '0';
  e10[0] = 1;
  for (int i = 1; i <= 18; ++i) e10[i] = 10 * e10[i - 1];
  dp[0][0] = 0;
  for (int i = 1; i <= n; ++i) {
    dp[i][0] = dp[i - 1][0] + e10[n - i] * a[i - 1];
    p[i][0] = H;
  }
  for (int j = 1; j <= n; ++j) {
    dp[0][j] = dp[0][j - 1] + e10[n - j] * a[j - 1];
    p[0][j] = M;
  }
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= n; ++j) {
      long long h = dp[i - 1][j] + e10[n - i] * a[i + j - 1];
      long long m = dp[i][j - 1] + e10[n - j] * a[i + j - 1];
      if (h >= m) {
        dp[i][j] = h;
        p[i][j] = H;
      } else if (m > h) {
        dp[i][j] = m;
        p[i][j] = M;
      }
    }
  int i = n, j = n;
  string ans;
  while (i != 0 || j != 0) {
    if (p[i][j] == H) {
      ans.push_back('H');
      --i;
    } else if (p[i][j] == M) {
      ans.push_back('M');
      --j;
    }
  }
  for (int i = ans.size() - 1; i >= 0; --i) cout << ans[i];
  return 0;
}
