#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T BM(T p, T e, T M) {
  long long int ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p) % M;
    p = (p * p) % M;
  }
  return (T)ret;
}
template <class T>
inline T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
inline T MDINV(T a, T M) {
  return BM(a, M - 2, M);
}
template <class T>
inline T PW(T p, T e) {
  long long int ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p);
    p = (p * p);
  }
  return (T)ret;
}
template <class T>
string NTS(T Number) {
  stringstream ss;
  ss << Number;
  return ss.str();
}
template <class T>
T stringtonumber(const string &Text) {
  istringstream ss(Text);
  T result;
  return ss >> result ? result : 0;
}
long long int n = 0;
char s[40];
long long int vis[40][40][40];
long long int arr[20];
void vua() {
  arr[0] = 1;
  for (long long int i = 1; i <= 18; i++) {
    arr[i] = arr[i - 1];
    arr[i] *= 10;
  }
}
long long int dp(long long int i, long long int j, long long int k) {
  if (i == 2 * n + 1) {
    if (j == n)
      return 0;
    else
      return -((1LL << 63) - 1LL);
  }
  long long int &ret = vis[i][j][k];
  if (ret != -1) return ret;
  ret = -((1LL << 63) - 1LL);
  if (j + 1 <= n) {
    ret = max(ret, (s[i] - '0') * arr[n - j - 1] + dp(i + 1, j + 1, k));
  }
  if (k + 1 <= n) {
    ret = max(ret, (s[i] - '0') * arr[n - k - 1] + dp(i + 1, j, k + 1));
  }
  return ret;
}
long long int res;
char ch[40];
void recur(long long int i, long long int j, long long int k) {
  if (i == 2 * n + 1) {
    return;
  }
  int lo = 0;
  if (j + 1 <= n) {
    long long int sum = (s[i] - '0') * arr[n - j - 1];
    if (res - sum == vis[i + 1][j + 1][k]) {
      ch[i] = 'H';
      res -= sum;
      lo = 1;
      recur(i + 1, j + 1, k);
    }
  }
  if (k + 1 <= n && lo == 0) {
    long long int sum = (s[i] - '0') * arr[n - k - 1];
    if (res - sum == vis[i + 1][j][k + 1]) {
      ch[i] = 'M';
      res -= sum;
      lo = 1;
      recur(i + 1, j, k + 1);
    }
  }
}
int main() {
  vua();
  scanf("%lld", &n);
  scanf("%s", s + 1);
  memset(vis, -1, sizeof vis);
  res = dp(1, 0, 0);
  vis[2 * n + 1][n][n] = 0;
  recur(1, 0, 0);
  printf("%s\n", ch + 1);
  return 0;
}
