#include <bits/stdc++.h>
using namespace std;
string b;
long long int n;
long long int k;
long long int dp[40][40][40];
vector<long long int> s;
long long int f(long long int index, long long int x, long long int y) {
  if (index == n) {
    return 0;
  }
  long long int &result = dp[index][x][y];
  if (result != -1) {
    return result;
  }
  result = 0;
  if (x != k) {
    result = max(result, s[x] * ((long long int)(b[index] - '0')) +
                             f(index + 1, x + 1, y));
  }
  if (y != k) {
    result = max(result, s[y] * ((long long int)(b[index] - '0')) +
                             f(index + 1, x, y + 1));
  }
  return result;
}
void ff(long long int index, long long int x, long long int y) {
  if (index == n) {
    return;
  }
  long long int result = f(index, x, y);
  if (x != k) {
    long long int xx =
        (s[x] * ((long long int)(b[index] - '0')) + f(index + 1, x + 1, y));
    if (xx == result) {
      cout << "H";
      ff(index + 1, x + 1, y);
      return;
    }
  }
  cout << "M";
  ff(index + 1, x, y + 1);
}
int main() {
  cin >> n;
  k = n;
  n = n * 2;
  long long int xx = 1;
  for (long long int i = 1; i <= k; i++) {
    s.push_back(xx);
    xx = xx * 10LL;
  }
  reverse(s.begin(), s.end());
  cin >> b;
  memset(dp, -1, sizeof(dp));
  f(0, 0, 0);
  ff(0, 0, 0);
  return 0;
}
