#include <bits/stdc++.h>
using namespace std;
const int M = 18 + 10;
long long int totalsum[M][M];
char result[M][M];
int parentnoderow[M][M];
int parentnodecol[M][M];
long long int ten_exp(int n) {
  long long int res = 1;
  for (int i = 0; i < n; i++) {
    res = res * 10;
  }
  return res;
}
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  totalsum[0][1] = (s[0] - '0') * ten_exp(n - 1);
  totalsum[1][0] = (s[0] - '0') * ten_exp(n - 1);
  result[0][1] = 'M';
  result[1][1] = 'H';
  for (int cnt = 2; cnt <= 2 * n; cnt++) {
    for (int row = 0; row <= n; row++) {
      int col = cnt - row;
      long long int max_tmp = 0;
      if (col >= 0 && col <= n) {
        long long int max_tmp = 0;
        if (row <= n && row >= 0 && col - 1 >= 0 && col - 1 <= n) {
          long long int cur = (s[cnt - 1] - '0') * ten_exp(n - col);
          max_tmp = totalsum[row][col - 1] + cur;
          result[row][col] = 'M';
          parentnoderow[row][col] = row;
          parentnodecol[row][col] = col - 1;
        }
        if (row - 1 >= 0 && row - 1 <= n && col >= 0 && col <= n) {
          long long int cur = (s[cnt - 1] - '0') * ten_exp(n - row);
          if (totalsum[row - 1][col] + cur >= max_tmp) {
            max_tmp = totalsum[row - 1][col] + cur;
            result[row][col] = 'H';
            parentnoderow[row][col] = row - 1;
            parentnodecol[row][col] = col;
          }
        }
        totalsum[row][col] = max_tmp;
      }
    }
  }
  vector<char> ans;
  int startrow = n;
  int startcol = n;
  for (int i = 1; i <= 2 * n; i++) {
    ans.push_back(result[startrow][startcol]);
    int nextrow = parentnoderow[startrow][startcol];
    int nextcol = parentnodecol[startrow][startcol];
    startrow = nextrow;
    startcol = nextcol;
  }
  for (int i = ans.size() - 1; i >= 0; i--) {
    cout << ans[i];
  }
  cout << endl;
  return 0;
}
