#include <bits/stdc++.h>
using namespace std;
long long int n, dp[37][19][19];
string second;
string ans;
long long int func(long long int ind, long long int x, long long int y) {
  if (ind == -1) return 0;
  if (dp[ind][x][y] != -1) return dp[ind][x][y];
  long long int o = second[ind] - '0';
  long long int res = 0;
  if (x > 0) {
    res = pow(10, (n - x)) * o + func(ind - 1, x - 1, y);
  }
  if (y > 0) {
    long long int e = pow(10, n - y);
    res = max(res, e * o + func(ind - 1, x, y - 1));
  }
  return dp[ind][x][y] = res;
}
void gen(long long int ind, long long int x, long long int y) {
  if (ind == -1) return;
  long long int o = second[ind] - '0';
  long long int e = pow(10, n - x), first = pow(10, n - y);
  if (x == 0) {
    ans = 'M' + ans;
    gen(ind - 1, x, y - 1);
  } else if (y == 0) {
    ans = 'H' + ans;
    gen(ind - 1, x - 1, y);
  } else if (e * o + dp[ind - 1][x - 1][y] >
             first * o + dp[ind - 1][x][y - 1]) {
    ans = 'H' + ans;
    gen(ind - 1, x - 1, y);
  } else {
    ans = 'M' + ans;
    gen(ind - 1, x, y - 1);
  }
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  memset(dp, -1, sizeof(dp));
  cin >> n;
  cin >> second;
  func(2 * n - 1, n, n);
  gen(2 * n - 1, n, n);
  cout << ans;
}
