#include <bits/stdc++.h>
using namespace std;
const int N = 20;
unsigned long long dp[2 * N][N];
bool t[2 * N][N];
string s;
unsigned long long p[N];
char c[2] = {'M', 'H'};
int main() {
  p[0] = 1;
  for (int i = 1; i < N; i++) p[i] = p[i - 1] * 10;
  int n;
  cin >> n >> s;
  for (int i = 1; i <= 2 * n; i++)
    for (int j = 0; j <= min(i, n); j++) {
      int k = i - j;
      if (k > n) continue;
      if (j > 0 &&
          dp[i][j] <= dp[i - 1][j - 1] + ((s[i - 1] - '0') * p[n - j])) {
        dp[i][j] = dp[i - 1][j - 1] + ((s[i - 1] - '0') * p[n - j]);
        t[i][j] = 1;
      }
      if (k > 0 && dp[i][j] <= dp[i - 1][j] + ((s[i - 1] - '0') * p[n - k])) {
        dp[i][j] = dp[i - 1][j] + ((s[i - 1] - '0') * p[n - k]);
        t[i][j] = 0;
      }
    }
  int a = n;
  for (int i = 2 * n; i >= 1; i--) {
    s[i - 1] = c[t[i][a]];
    a -= t[i][a];
  }
  cout << s << "\n";
  return 0;
}
