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<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<functional>
#include<assert.h>
#include<numeric>
using namespace std;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
typedef long long ll;
typedef pair<int,int> pint;
typedef pair<ll,int> pli;
const int inf=1e9+7;
const ll longinf=1LL<<60 ;
const ll mod=1e9+7 ;

int main(){
    int n;
    cin>>n;
    int ans=1;
    rep(i,n){
        char c;
        cin>>c;
        int ret=(c=='T');
        ans=(!ans)|ret;
    }
    cout<<(ans?'T' : 'F')<<endl;
    
    return 0;
}
