#include <bits/stdc++.h>
using namespace std;
template <class T>
ostream &operator<<(ostream &os, vector<T> V) {
  os << "[ ";
  for (auto v : V) os << v << " ";
  os << "]";
  return os;
}
template <class T>
ostream &operator<<(ostream &os, set<T> S) {
  os << "{ ";
  for (auto s : S) os << s << " ";
  return os << "}";
}
template <class L, class R>
ostream &operator<<(ostream &os, map<L, R> M) {
  os << "{ ";
  for (auto m : M) os << "(" << m.first << ":" << m.second << ") ";
  return os << "}";
}
template <class L, class R>
ostream &operator<<(ostream &os, pair<L, R> P) {
  return os << "(" << P.first << "," << P.second << ")";
}
const long long N = 37;
long long dp[N][N], child[N][N], n;
string s, ans;
long long rec(long long in, long long k) {
  if (in == (n << 1)) {
    if (k == n) return 0;
    return -1e18;
  }
  if (dp[in][k] != -1) return dp[in][k];
  long long x = -1;
  long long k1 = in - k;
  if (k < n && (s[in] - '0') * pow(10, n - k - 1) + rec(in + 1, k + 1) > x) {
    x = (s[in] - '0') * pow(10, n - k - 1) + rec(in + 1, k + 1);
    child[in][k] = 1;
  }
  if (k1 < n && (s[in] - '0') * pow(10, n - k1 - 1) + rec(in + 1, k1 + 1) > x) {
    x = (s[in] - '0') * pow(10, n - k1 - 1) + rec(in + 1, k);
    child[in][k] = 2;
  }
  return dp[in][k] = x;
}
void get(long long in, long long k) {
  if (in == (n << 1)) return;
  if (child[in][k] == 1)
    ans.push_back('H'), get(in + 1, k + 1);
  else
    ans.push_back('M'), get(in + 1, k);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> s;
  memset(dp, -1, sizeof(dp));
  rec(0, 0);
  get(0, 0);
  cout << ans;
  return 0;
}
