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>
using namespace std;
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
typedef long long LL;
int N;

int A[100001];
int main(){
	cin>>N;
	REP(i,N){
		string s;
		cin>>s;
		if(s[0]=='T'){
			A[i]=1;
		}else{
			A[i]=0;
		}
	}
	REP(i,N-1){
		if(A[i]==1&&A[i+1]==0){
			A[i+1]=0;
		}else{
			A[i+1]=1;
		}
	}
	if(A[N-1]==1){
		cout<<"T"<<endl;
	}else{
		cout<<"F"<<endl;
	}
}
