#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
long long q, n, ans, p, a[500005];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cout.precision(30);
  cerr.precision(7);
  ;
  cin >> q;
  while (q--) {
    p = 0;
    ans = 0;
    cin >> n;
    for (int i = 1; i <= n; i++) cin >> a[i];
    while (true) {
      if (!a[1] && !a[n] && is_sorted(a + 1, a + n + 1)) break;
      int mx = 0;
      for (int i = 1; i <= n; i++) {
        if (!a[i]) continue;
        if (i == p) continue;
        if (a[i] > a[mx]) mx = i;
      }
      ans ^= 1;
      p = mx;
      a[mx]--;
    }
    cout << (!ans ? "HL" : "T") << "\n";
  }
  return 0;
}
