#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  vector<vector<long long> > d(2 * n + 1, vector<long long>(n + 1));
  vector<vector<char> > path(2 * n + 1, vector<char>(n + 1));
  vector<long long> w(n + 1);
  w[0] = 1;
  for (int i = 1; i < (int)(w).size(); ++i) w[i] = w[i - 1] * 10;
  for (int k = 1; k <= 2 * n; ++k) {
    long long x = s[k - 1] - '0';
    for (int i = 0; i <= k; ++i) {
      int j = k - i;
      if (i > n || j > n) continue;
      long long t1 = -1, t2 = -1;
      if (i > 0) t1 = d[k - 1][i - 1] + x * w[n - i];
      if (j > 0) t2 = d[k - 1][i] + x * w[n - j];
      if (t1 > t2) {
        d[k][i] = t1;
        path[k][i] = 'H';
      } else {
        d[k][i] = t2;
        path[k][i] = 'M';
      }
    }
  }
  string res;
  for (int i = 2 * n, j = n; i >= 1; --i) {
    res = path[i][j] + res;
    if (path[i][j] == 'H') j--;
  }
  cout << res << endl;
}
