problem

There is a mysterious device $ M $, and if you put Tanuki and Fox in this device, one animal will come out from the device (hereinafter, Tanuki will be $ T $ and Fox will be $ F $).

$ M (x, y) $ represents an animal that came out by putting animals in the device $ M $ in the order of $ x, y $.

As a result of various trials, the following was found.


$ M (T, T) = T $
$ M (T, F) = F $
$ M (F, T) = T $
$ M (F, F) = T $



You put the animals in a row $ P_1, P_2, ..., P_N $ into the device as follows.
$ M (.... M (M (P_1, P_2), P_3) ...., P_N) $

Answer the last animal that appears.



output

Output the last animal character $ T $ or $ F $, and also a newline at the end.

Example

Input

3
F T T


Output

T
#include<bits/stdc++.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define HUGE_NUM 99999999999999999
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;


#define NUM 100005

int main(){

	int N;
	scanf("%d",&N);

	char A[2],B[2],current[2];

	scanf("%s %s",A,B);

	bool is_T = (B[0] == 'T') || (A[0] == 'F');

	for(int i = 2; i < N; i++){

		scanf("%s",current);

		if(current[0] == 'T'){

			is_T = true;

		}else{

			if(is_T){

				is_T = false;
			}else{

				is_T = true;
			}
		}
	}

	if(is_T){

		printf("T\n");

	}else{

		printf("F\n");
	}

	return 0;
}

