#include <bits/stdc++.h>
using namespace std;
int n;
string s;
long long dp[21][21];
long long deg10[21];
char ans[21][21];
long long solve(int l = 0, int r = 0) {
  if (l == n && r == n) return 0;
  if (dp[l][r] >= 0) return dp[l][r];
  if (l < n) {
    long long sum = (int(s[l + r] - '0')) * deg10[n - l - 1] + solve(l + 1, r);
    if (sum > dp[l][r]) {
      dp[l][r] = sum;
      ans[l][r] = 'H';
    }
  }
  if (r < n) {
    long long sum = (int(s[l + r] - '0')) * deg10[n - r - 1] + solve(l, r + 1);
    if (sum > dp[l][r]) {
      dp[l][r] = sum;
      ans[l][r] = 'M';
    }
  }
  return dp[l][r];
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> s;
  deg10[0] = 1;
  memset(dp, -1, sizeof(dp));
  for (int i = 1; i <= 18; ++i) deg10[i] = deg10[i - 1] * 10;
  solve();
  int h = 0, m = 0;
  while (h < n || m < n) {
    if (ans[h][m] == 'H') {
      cout << ans[h][m];
      h++;
    } else {
      cout << ans[h][m];
      m++;
    }
  }
  return 0;
}
