#define _CRT_SECURE_NO_WARNINGS

#include <cstdio>
#include <stdio.h>
#include <iostream>
#include <string.h>
#include <math.h>
#include <algorithm>
#include <vector>

typedef long long LL;
typedef std::vector<LL> VLL;

constexpr auto MAX_A = 1000000002LL;
constexpr auto MAX_N = 500000;

int main()
{
	int n;
	auto _ = scanf("%d\n", &n);
	VLL sumy(n);	
	VLL sumySort(n);
	LL maxSum = 0;

	for (int i = 0; i < n; i++)
	{		
		LL sum;
		auto _ = scanf("%lld", &sum);		
		sumy[i]=sumySort[i] = sum;
		if (sum > maxSum) maxSum = sum;
	}
	std::sort(sumySort.begin(), sumySort.end());
	
	LL fullSum = 0;
	LL growSum = 0;
	LL prev = 0;
	LL granica = sumySort[0]; //granica po ktorej wszystkie sumy są za małe zeby zjesc wszystkie inne
	for (auto s : sumySort)
	{
		// nie sumuj elementow gdy przekroczy maksymalna wielkosc suma (to i tak nic nie zmieni a moze przepelnic)
		if (fullSum < maxSum)
		{
			fullSum += s;
		}			
		if (growSum > s)
		{
			growSum += s;
		}
		if (prev < s)
		{			
			if (s > growSum)
			{
				granica = growSum;
			}
			growSum = fullSum;
		}			
		prev = s;
		if (growSum > maxSum || s==maxSum) break;
	}
	for (int i = 0; i < sumy.size(); i++)
	{		
		printf("%c",sumy[i]<=granica ? 'N' : 'T');
	}
	printf("\n");
	return 0;
}
