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 <functional>
#include <vector>
#include <utility>
#include <cstring>
#include <iomanip>
#include <numeric>
#include <limits>
#include <cmath>
#include <cassert>

using namespace std;
using ll = long long;

const int INF = 1<<30;
const int MOD = (int)1e9 + 7;
const int MAX_N = (int)1e5 + 5;
#define debug(x) cout << #x << ": " << x << endl

char M(char a, char b)
{
    if(a == 'T' and b == 'T') return 'T';
    if(a == 'T' and b == 'F') return 'F';
    if(a == 'F' and b == 'T') return 'T';
    return 'T';
}

signed main(void)
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int N; cin >> N;
    vector<char> P(N);
    for(int i = 0; i < N; i++) cin >> P[i];
    for(int i = 1; i < N; i++)
    {
        P[i] = M(P[i - 1], P[i]);
    }
    cout << P[N - 1] << endl;
    return 0;
}


