#include <bits/stdc++.h>
int diru[] = {-1, -1, -1, 0, 0, 1, 1, 1};
int dirv[] = {-1, 0, 1, -1, 1, -1, 0, 1};
using namespace std;
template <class T>
T sq(T n) {
  return n * n;
}
template <class T>
T gcd(T a, T b) {
  return (b != 0 ? gcd<T>(b, a % b) : a);
}
template <class T>
T lcm(T a, T b) {
  return (a / gcd<T>(a, b) * b);
}
template <class T>
bool inside(T a, T b, T c) {
  return a <= b && b <= c;
}
template <class T>
void setmax(T &a, T b) {
  if (a < b) a = b;
}
template <class T>
void setmin(T &a, T b) {
  if (b < a) a = b;
}
template <class T>
T power(T N, T P) {
  return (P == 0) ? 1 : N * power(N, P - 1);
}
struct X {
  string h, m;
};
bool isV[100][100][100];
X dp[100][100][100];
char N[100][100][100];
char in[100];
int n;
long long unsigned conv(string a, string b, long long unsigned x) {
  long long unsigned p = 0, ten = 1;
  int i;
  for (i = ((int)a.size()) - 1; i > -1; i--) {
    p += ten * (a[i] - '0');
    ten *= 10;
  }
  p += ten * x;
  ten = 1;
  for (i = ((int)b.size()) - 1; i > -1; i--) {
    p += ten * (b[i] - '0');
    ten *= 10;
  }
  return p;
}
X cal(int i, int a, int b) {
  X tmp;
  if (i == n * 2) {
    tmp.h = "";
    tmp.m = "";
    return tmp;
  }
  if (isV[i][a][b]) return dp[i][a][b];
  bool f = 1;
  long long unsigned x, tot;
  X ret;
  if (a > 0) {
    tmp = cal(i + 1, a - 1, b);
    x = conv(tmp.h, tmp.m, in[i] - '0');
    ret.h = in[i];
    ret.h += tmp.h;
    ret.m = tmp.m;
    N[i][a][b] = 'H';
    f = 0;
  }
  if (b > 0) {
    tmp = cal(i + 1, a, b - 1);
    tot = conv(tmp.m, tmp.h, in[i] - '0');
    if (f || x < tot) {
      ret.m = in[i];
      ret.m += tmp.m;
      ret.h = tmp.h;
      N[i][a][b] = 'M';
    }
  }
  isV[i][a][b] = 1;
  return dp[i][a][b] = ret;
}
void print() {
  int x = N[0][n][n];
  int p = n;
  int q = n, i;
  for (i = 1; i < 2 * n; i++) {
    putchar(x);
    if (x == 'H')
      p--;
    else
      q--;
    x = N[i][p][q];
  }
  putchar(x);
  puts("");
}
int main() {
  int i, j, k;
  while (scanf("%d", &n) == 1) {
    scanf("%s", in);
    for (i = 0; i < 100; i++)
      for (j = 0; j < 100; j++)
        for (k = 0; k < 100; k++) isV[i][j][k] = 0;
    X tmp = cal(0, n, n);
    print();
  }
  return 0;
}
