1.

/*
* ACM Contest training
* Problem: 634 - Polygon
* Link: http://uva.onlinejudge.org/index.php?option=onlinejudge&Itemid=99999999&page=show_problem&category=&problem=575
*
* @author Christoph Goettschkes
* @version 1.0, 11/14/2010
*
* Method : Ad-Hoc
* Status : Accepted
* Runtime: 0.092
*/

import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;

import java.util.StringTokenizer;

class Main
{
static final BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
public static void main(String[] agrs) throws IOException
{
int numberOfVertices = Integer.parseInt(reader.readLine());

while (numberOfVertices > 0) {
int[][] vertices = new int[numberOfVertices][2];

for (int i = 0; i < numberOfVertices; i++) {
StringTokenizer tokenizer = new StringTokenizer(reader.readLine());
vertices[i][0] = Integer.parseInt(tokenizer.nextToken());
vertices[i][1] = Integer.parseInt(tokenizer.nextToken());
}

int[] point = new int[2];
StringTokenizer tokenizer = new StringTokenizer(reader.readLine());
point[0] = Integer.parseInt(tokenizer.nextToken());
point[1] = Integer.parseInt(tokenizer.nextToken());

int counter = 0;
for (int i = 0; i < numberOfVertices - 1; i++) {
if (vertices[i][0] == vertices[i + 1][0] && vertices[i][0] > point[0]) {
if (Math.min(vertices[i][1], vertices[i + 1][1]) < point[1] && Math.max(vertices[i][1], vertices[i+1][1]) > point[1]) {
counter++;
}
}
}
if (counter % 2 == 1)
System.out.println("T");
else
System.out.println("F");

numberOfVertices = Integer.parseInt(reader.readLine());
}
}
}