#include <bits/stdc++.h>
using namespace std;
long long add(long long a, long long b, long long mod) {
  return (a % mod + b % mod) % mod;
}
long long sub(long long a, long long b, long long mod) {
  return (a % mod - b % mod + mod) % mod;
}
long long mul(long long a, long long b, long long mod) {
  return (a % mod * b % mod) % mod;
}
long long M = 1e9 + 7;
const int sz = 18 + 10;
const int OO = 0x3f3f3f3f;
long long fastpower(long long b, long long p) {
  long long ans = 1;
  while (p) {
    if (p % 2) {
      ans = ans * b;
    }
    b = b * b;
    p /= 2;
  }
  return ans;
}
long long dp[sz][sz];
string s;
int n;
long long solve(int cur, int cur2) {
  if (cur == n && cur2 == n) {
    return 0;
  }
  long long &ret = dp[cur][cur2];
  if (~ret) {
    return ret;
  }
  ret = -1e18;
  if (cur < n && cur2 < n) {
    ret = max(ret, solve(cur + 1, cur2) +
                       fastpower(10, n - cur - 1) * (s[cur + cur2] - '0'));
    ret = max(ret, solve(cur, cur2 + 1) +
                       fastpower(10, n - cur2 - 1) * (s[cur + cur2] - '0'));
  } else if (cur < n) {
    ret = max(ret, solve(cur + 1, cur2) +
                       fastpower(10, n - cur - 1) * (s[cur + cur2] - '0'));
  } else if (cur2 < n) {
    ret = max(ret, solve(cur, cur2 + 1) +
                       fastpower(10, n - cur2 - 1) * (s[cur + cur2] - '0'));
  }
  return ret;
}
void print_solve(int cur, int cur2) {
  if (cur == n && cur2 == n) {
    return;
  }
  long long &ret = dp[cur][cur2];
  if (cur < n && cur2 < n) {
    if (ret == solve(cur + 1, cur2) +
                   fastpower(10, n - cur - 1) * (s[cur + cur2] - '0')) {
      cout << "H";
      print_solve(cur + 1, cur2);
      return;
    } else if (ret == solve(cur, cur2 + 1) +
                          fastpower(10, n - cur2 - 1) * (s[cur + cur2] - '0')) {
      cout << "M";
      print_solve(cur, cur2 + 1);
      return;
    }
  } else if (cur < n) {
    if (ret == solve(cur + 1, cur2) +
                   fastpower(10, n - cur - 1) * (s[cur + cur2] - '0')) {
      cout << "H";
      print_solve(cur + 1, cur2);
      return;
    }
  } else if (cur2 < n) {
    if (ret == solve(cur, cur2 + 1) +
                   fastpower(10, n - cur2 - 1) * (s[cur + cur2] - '0')) {
      cout << "M";
      print_solve(cur, cur2 + 1);
      return;
    }
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n;
  cin >> s;
  memset(dp, -1, sizeof(dp));
  solve(0, 0);
  print_solve(0, 0);
  return 0;
}
