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;
 
int main()
{
    int t,i,ar[200000],it1,it2,z;
    char c,p;
    
    cin>>t;
    for (i=0;i<t;++i){
 
        cin>>c;
        z=(int)c;
        ar[i]=z;
 
    }
    for (i=0;i<t-1;++i){
 
        it1=ar[i];
        it2=ar[i+1];
        if (it1 == 84  &&  it2 == 84)ar[i+1]=84;
        else if (it1 == 84  &&  it2 == 70)ar[i+1]=70;
        else if (it1 == 70  &&  it2 == 84)ar[i+1]=84;
        else if (it1 == 70  &&  it2 == 70)ar[i+1]=84;
 
 
    }
    printf ("%c\n",ar[t-1]);
 
    return 0;
}
