Problem:


Score : 200 points

Problem Statement

In Japan, people make offerings called hina arare, colorful crackers, on March 3.

We have a bag that contains N hina arare. (From here, we call them arare.)

It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow.

We have taken out the arare in the bag one by one, and the color of the i-th arare was S_i, where colors are represented as follows - pink: P, white: W, green: G, yellow: Y.

If the number of colors of the arare in the bag was three, print Three; if the number of colors was four, print Four.

Constraints

1 \leq N \leq 100

S_i is P, W, G or Y.

There always exist i, j and k such that S_i=P, S_j=W and S_k=G.

Input

Input is given from Standard Input in the following format:

N
S_1 S_2 ... S_N

Output

If the number of colors of the arare in the bag was three, print Three; if the number of colors was four, print Four.

Sample Input 1

6
G W Y P Y W

Sample Output 1

Four

The bag contained arare in four colors, so you should print Four.

Sample Input 2

9
G W W G P W P G G

Sample Output 2

Three

The bag contained arare in three colors, so you should print Three.

Sample Input 3

8
P Y W G Y W Y Y

Sample Output 3

Four



Sample input:
6
G W Y P Y W


Sample output:
Four

Submission status: Accepted

Solution code:
n = int(input())
lst = set(map(str,input().split()))
if len(lst)==3:
    print('Three')
else:
    print('Four')

Submission status: Accepted

Solution code:
n = int(input())
s = input().split()
print("Three") if len(set(s)) == 3 else print("Four")

Submission status: Accepted

Solution code:
n = int(input())
p = list(input().split())
if p.count("Y"):
    print("Four")
else:
    print("Three")

Submission status: Accepted

Solution code:
n=int(input())
arare=list(input().split())
ans=len(set(arare))

if ans==3:
    print("Three")

elif ans==4:
    print("Four")

Submission status: Accepted

Solution code:
N = int(input())
Alist = input().split()
 
a = set(Alist)
if len(a) == 3:
    print('Three')
else:
    print('Four')

Submission status: Accepted

Solution code:
N = int(input())
S = input()

if "Y" in S:
    print("Four")
else:
    print("Three")

Submission status: Accepted

Solution code:
n=input()
a=list(input().split())
num=a.count("Y")
if num>0:
    print("Four")
else:print("Three")

Submission status: Accepted

Solution code:
N = int(input())
S = list(input().split())
ans = ""
if all(S.count(a) >= 1 for a in "PWGY"):
    print("Four")
else:
    print("Three")

Submission status: Accepted

Solution code:
N = int(input())
S = [x for x in input().split()]
num = 'Three'
for s in S:
  if s == 'Y':
    num = 'Four'
  
print(num)

Submission status: Accepted

Solution code:
N = int(input())
S = input().split()
S = list(set(S))
if len(S) == 3:
  print("Three")
else:
  print("Four")

Submission status: Accepted

Solution code:
N = input()
Inp = set(list(input().replace(' ','')))
if len(Inp) == 4: 
	print('Four')
elif len(Inp) == 3: 
	print('Three')

Submission status: Accepted

Solution code:
N = int(input())
S = list(input().split())
hina = ['P', 'Y', 'W', 'G']
ans = 0
for i in hina:
  if i in S:
    ans += 1
print('Four' if ans == 4 else 'Three')

Submission status: Accepted

Solution code:
n = int(input())
s_list = [s for s in input().split()]
print('Four' if 'Y' in s_list else 'Three')

Submission status: Accepted

Solution code:
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

N = n()
Ss = sl()

seen = set()
for S in Ss:
    seen.add(S)

if len(seen) == 3:
    print('Three')
else:
    print('Four')

Submission status: Accepted

Solution code:
import sys

def input():
    return sys.stdin.readline().rstrip()

if __name__ == "__main__":
    n = int(input())
    l = list(input().split())

    print("Four" if l.count("Y") > 0 else "Three")

Submission status: Accepted

Solution code:
import sys

def input():
    return sys.stdin.readline().rstrip()

if __name__ == "__main__":
    n = int(input())
    l = list(input().split())

    set = len(set(l))

    if set == 3:
        print("Three")
    elif set == 4:
        print("Four")

Submission status: Accepted

Solution code:
N = int(input())
S = set(input().split())

if len(S) == 3:
    print('Three')
else:
    print('Four')

Submission status: Accepted

Solution code:
n = int(input())
arare = [i for i in input().split()]
if 'Y' in arare:
    print('Four')
else:
    print('Three')

Submission status: Accepted

Solution code:
def resolve():
	n=int(input())
	s=map(str,input().split())
	ans='Four' if 'Y' in s else 'Three'
	print(ans)
resolve()

Submission status: Accepted

Solution code:
n = int(input())
l = list(input().split())
if len(set(l)) == 3:
  print("Three")
else:
  print("Four")

Submission status: Accepted

Solution code:
n = int(input())
s = input().split()
if 'Y' in s:
  print("Four")
else:
  print("Three")

Submission status: Accepted

Solution code:
a = int(input())
f = [num for num in input().split()]

f_u = list(set(f))

if len(f_u) == 4 :
    print("Four")
else :
    print("Three")

Submission status: Accepted

Solution code:
def main():
	N = int(input())
	S = list(input().split())
	arare = set()
	for c in S:
		arare.add(c)
	if len(arare) == 4:
		print("Four")
	else:
		print("Three")


if __name__ == '__main__':
	main()

Submission status: Accepted

Solution code:
def abc():
    input()
    a = set(input().split())
    print('Three' if len(a) == 3 else 'Four')

    
abc()

Submission status: Accepted

Solution code:
from collections import Counter
N = int(input())
S = list(map(str,input().split()))
A = Counter(S).most_common()
if len(A) == 3:
    print('Three')
elif len(A) == 4:
    print('Four')

Submission status: Accepted

Solution code:
n=int(input())
a=input().split()
if 'Y' in a:
  print('Four')
else:
  print('Three')

Submission status: Accepted

Solution code:
N = int(input())
S = input().split(" ")
print('Four' if len(list(set(S)))==4 else 'Three')

Submission status: Accepted

Solution code:
n = int(input())
s = set(input())
s = list(s)
s = sorted(s)
if len(s) == 4:
    print('Three')
else:
    print('Four')

Submission status: Accepted

Solution code:
import bisect
import os
from collections import Counter, deque
from fractions import gcd
from functools import lru_cache
from functools import reduce
import functools
import heapq
import itertools
import math
import numpy as np
import re
import sys

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

N = int(sys.stdin.readline())
S = sys.stdin.readline().rstrip().split()

if len(set(S)) == 3:
    print('Three')
else:
    print('Four')

Submission status: Accepted

Solution code:
n = int(input())
li = set(input().split())
if len(li) == 4:
  print("Four")
else:
  print("Three")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

n = int(input())
s = set(list(input().split()))
print('Four' if len(s) == 4 else 'Three')

Submission status: Accepted

Solution code:
n = int(input())

arare_inp = input().split()
arare = list(arare_inp)

flag = 0
for i in range(n):
    if arare[i] == "Y":
        print("Four")
        flag = 1
        break

if flag == 0:
    print("Three")

Submission status: Accepted

Solution code:
n=int(input())
sl=list(input().split())
for s in sl:
    if s=='Y':
        print('Four')
        exit()
print('Three')

Submission status: Accepted

Solution code:
N = int(input())
x = len(set(input().split()))

answer = 'Three' if x == 3 else 'Four'
print(answer)

Submission status: Accepted

Solution code:
from functools import reduce
import math

def main():
    # 文字列の2進数を数値にする
    # '101' → '5'
    # 文字列の頭に'0b'をつけてint()にわたす
    # binary = int('0b'+'101',0)

    # 2進数で立っているbitを数える
    # 101(0x5) → 2
    # cnt_bit = bin(5).count('1')
    
    # N! を求める
    # f = math.factorial(N)

    # N の逆元
    # N_inv = pow(N,MOD-2,MOD)

    # nCr
    # Nの階乗 * rの階乗の逆元 * n-rの階乗の逆元
    
    # 切り捨て
    # 4 // 3
    # 切り上げ
    #-(-4 // 3)
    
    # 初期値用:十分大きい数(100億)
    INF = float("inf")

    # 大きな素数
    MOD = 10**9+7
    
    # 1文字のみを読み込み
    # 入力:2
    a = input().rstrip()
    # 変数:a='2'
    
    # スペース区切りで標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a, b, c, d = (int(_) for _ in input().split())  
    # 変数:a=2 b=4 c=5 d =7
    
    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a = list(int(_) for _ in input().split())
    # 変数:a = [2, 4, 5, 7]    

    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2457
    # a = list(int(_) for _ in input())
    # 変数:a = [2, 4, 5, 7]
    s = input().rstrip()
    if s.count('Y') >0:
        print('Four')
    else:
        print('Three')
        
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n=int(input())
a=input()
if "Y" in a:
  print("Four")
else:
  print("Three")

Submission status: Accepted

Solution code:
n=int(input())
s=list(input().split())
if 'Y' in s:
  print('Four')
else:
  print('Three')

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(N: int, S: "List[str]"):
    print("Four" if "Y" in S else "Three")


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    S = [ next(tokens) for _ in range(N) ]  # type: "List[str]"
    solve(N, S)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
s = list(input().split())
s = list(set(s))
len = len(s)
if len == 3:
    print("Three")
elif len == 4:
    print("Four")

Submission status: Accepted

Solution code:
n = int(input())
s = list(map(str,input().split()))
if 'Y' in s:
    print('Four')
else:
    print('Three')

Submission status: Accepted

Solution code:
n = int(input())
s = list(map(str, input().split()))
if 'P' in s and 'W' in s and 'G' in s and 'Y' in s :
    print('Four')
else :
    print('Three')

Submission status: Accepted

Solution code:
N = int(input())
S = list(map(str, input().split()))

for i in range(len(S)-1):
    if S[i] == 'Y':
        print("Four")
        exit()
print("Three")

Submission status: Accepted

Solution code:
N = int(input())
S = list(input())
ans = "Three"
for i in S:
  if i == "Y":
    ans = "Four"

print(ans)

Submission status: Accepted

Solution code:
N = input()
S = [str(i) for i in input().split()]
s = set(S)
if len(s) == 3:
    print('Three')
else:
    print('Four')

Submission status: Accepted

Solution code:
N = int(input())
S = list(input().split())
if len(set(S)) == 3:
    print('Three')
else:
    print('Four')

Submission status: Accepted

Solution code:
n=int(input())
a=list(input().split())
print(["Three","Four"][len(set(a))-3])

Submission status: Accepted

Solution code:
n = int(input())
arare = list(map(str, input().split()))

if "Y" in arare:
  print("Four")
else:
  print("Three")

Submission status: Accepted

Solution code:
n = int(input())
s = input().split()
if len(set(s)) == 4:
    print("Four")
else:
    print("Three")

Submission status: Accepted

Solution code:
N = int(input())
lst = list(map(str, input().split()))

Y = lst.count('Y')

if Y == 0:
  print ('Three')
else:
  print ('Four')

Submission status: Accepted

Solution code:
def solve(S):
    S = set(S)
    if len(S) == 3:
        return "Three"
    else:
        return "Four"
N = int(input())
# N < 100

S = input().split()
# PWGY
print(solve(list(S)))

Submission status: Accepted

Solution code:
N = int(input())
arare = set(input().split())

if len(arare)==3:
  print('Three')
else:
  print('Four')

Submission status: Accepted

Solution code:
N = int(input())
arare = input().split()
arare.sort()
cnt = 0
tmp = 'N'
for i in range(0, N):
	if tmp != arare[i]:
		cnt += 1
		tmp = arare[i]
if cnt == 3: print('Three')
else: print('Four')

Submission status: Accepted

Solution code:
N=int(input())
s=list(input().split())
if len(set(s))==4:
    print("Four")
elif len(set(s))==3:
    print("Three")

Submission status: Accepted

Solution code:
N = int(input())
S = set(input().split())

if len(S) == 4:
	print('Four')
else:
	print('Three')

Submission status: Accepted

Solution code:
N = int(input())
Sls = []

x = input().split(" ")

yFlag = False

for i in range(N):
    if x[i] == 'Y':
        yFlag = True


if yFlag:
    print("Four")
else:
    print("Three")

Submission status: Accepted

Solution code:
n = int(input())
candy = {i for i in input().split()}
if len(candy) == 3:
    print('Three')
else:
    print('Four')

Submission status: Accepted

Solution code:
N=int(input())
S=input().split()
if "Y" in S:
    print('Four')
else:
    print('Three')

Submission status: Accepted

Solution code:
n=int(input())
l=list(map(str,input().split()))
f=0
for i in range(n):
    if l[i]=='Y':
        f+=1
if f==0:
    print('Three')
else:
    print('Four')

Submission status: Accepted

Solution code:
import collections
N = int(input())
S = list(map(str,input().split(' ')))
C = collections.Counter(S)
if len(C) == 3:
  print('Three')
else:
  print('Four')

Submission status: Accepted

Solution code:
n = int(input())
a = input().split()

if len(set(a)) == 3:
  print('Three')
elif len(set(a)) == 4:
  print('Four')

Submission status: Accepted

Solution code:
n = int(input())
s = input().split()

print("Four" if "Y" in s else "Three")

Submission status: Accepted

Solution code:
N=int(input())
list1=list(input())
for i in range(N):
  colar=list1[i]
  if colar=="Y":
    print("Four")
    break
else:
  print("Three")

Submission status: Accepted

Solution code:
n=int(input())
s=list(input().split())
c=set(s)


if len(c)==4:
    print('Four')
else:
    print('Three')

Submission status: Accepted

Solution code:
N=int(input())
s=list(map(lambda x:x,input().split()))
print("Four" if "Y" in s else "Three" )

Submission status: Accepted

Solution code:
n = int(input())
s = [x for x in input().split()]

cnt = "Three"
for i in s:
    if i == 'Y':
        cnt = "Four"

print(cnt)

Submission status: Accepted

Solution code:
#https://atcoder.jp/contests/abc089/tasks/abc089_b
N = input()
S = input().split()
for s in S:
    if s == "Y":
        print("Four")
        break
else:
    print("Three")

Submission status: Accepted

Solution code:
input()
S=input()
print('Four' if 'Y' in S else 'Three')

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(N: int, S: "List[str]"):
    ret = 'Three'
    for c in S:
        if c == 'Y':
            ret = 'Four'
    print(ret)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    S = [ next(tokens) for _ in range(N) ]  # type: "List[str]"
    solve(N, S)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:

from collections import defaultdict
from math import factorial
import itertools



def main():
    num = int(input())
    data = set(input().split())
    if len(data) == 4:
        print('Four')
    else:
        print('Three')




if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a = int(input())
b = (input().split(" "))

print("Four" if "Y" in b else
    "Three")

Submission status: Accepted

Solution code:
input()
print(["Three","Four"]["Y"in input()])

Submission status: Accepted

Solution code:
N = int(input())
S = input()
if S.count("Y") >= 1:
    print("Four")
else:
    print("Three")

Submission status: Accepted

Solution code:
n = int(input())
s = list(map(str,input().split()))
a = len(list(set(s)))
if a==3:
    print("Three")
else:
    print("Four")

Submission status: Accepted

Solution code:
n = int(input())
s = input().split()
arare = ["P", "W", "G", "Y"]


def hina(S):
    if S in arare:
        arare.remove(S)
    return len(arare)


for i in range(n):
    hina(s[i])
print("Four") if (4 - len(arare) == 4) else print("Three")

Submission status: Accepted

Solution code:
n = int(input())
s = input().split()
if s.count("Y") > 0:
	print("Four")
else:
	print("Three")

Submission status: Accepted

Solution code:
n = int(input())
dat_s = input().split()
a = set()
for i in range(len(dat_s)):
    a.add(dat_s[i])
if len(a) == 3:
    print("Three")
else:
    print("Four")

Submission status: Accepted

Solution code:
n = int(input())
arare = input().split()
if arare.count("Y") > 0:
	print("Four")
else:
	print("Three")

Submission status: Accepted

Solution code:
N = int(input())
s = set(input().split())
if len(s) == 3:
    print('Three')
else:
    print('Four')

Submission status: Accepted

Solution code:
N = int(input())
S = list(input().split())
Y_count = S.count("Y")
if Y_count >= 1:
    print("Four")
else:
    print("Three")

Submission status: Accepted

Solution code:
###############################################################################

from sys import stdout
from bisect import bisect_left as binl
from copy import copy, deepcopy
from collections import defaultdict


mod = 1


def intin():
    input_tuple = input().split()
    if len(input_tuple) <= 1:
        return int(input_tuple[0])
    return tuple(map(int, input_tuple))


def intina():
    return [int(i) for i in input().split()]


def intinl(count):
    return [intin() for _ in range(count)]


def modadd(x, y):
    global mod
    return (x + y) % mod


def modmlt(x, y):
    global mod
    return (x * y) % mod


def lcm(x, y):
    while y != 0:
        z = x % y
        x = y
        y = z
    return x


def combination(x, y):
    assert(x >= y)

    if y > x // 2:
        y = x - y

    ret = 1

    for i in range(0, y):
        j = x - i
        i = i + 1

        ret = ret * j
        ret = ret // i

    return ret


def get_divisors(x):
    retlist = []
    for i in range(1, int(x**0.5) + 3):
        if x % i == 0:
            retlist.append(i)
            retlist.append(x // i)
    return retlist


def get_factors(x):
    retlist = []
    for i in range(2, int(x**0.5) + 3):
        while x % i == 0:
            retlist.append(i)
            x = x // i
    retlist.append(x)
    return retlist


def make_linklist(xylist):
    linklist = {}
    for a, b in xylist:
        linklist.setdefault(a, [])
        linklist.setdefault(b, [])
        linklist[a].append(b)
        linklist[b].append(a)
    return linklist


def calc_longest_distance(linklist, v=1):
    distance_list = {}
    distance_count = 0
    distance = 0
    vlist_previous = []
    vlist = [v]
    nodecount = len(linklist)

    while distance_count < nodecount:
        vlist_next = []
        for v in vlist:
            distance_list[v] = distance
            distance_count += 1
            vlist_next.extend(linklist[v])
        distance += 1
        vlist_to_del = vlist_previous
        vlist_previous = vlist
        vlist = list(set(vlist_next) - set(vlist_to_del))

    max_distance = -1
    max_v = None
    for v, distance in distance_list.items():
        if distance > max_distance:
            max_distance = distance
            max_v = v

    return (max_distance, max_v)


def calc_tree_diameter(linklist, v=1):
    _, u = calc_longest_distance(linklist, v)
    distance, _ = calc_longest_distance(linklist, u)
    return distance


class UnionFind:

    def __init__(self, n):
        self.parent = [i for i in range(n)]

    def root(self, i):
        if self.parent[i] == i:
            return i
        self.parent[i] = self.root(self.parent[i])
        return self.parent[i]

    def unite(self, i, j):
        rooti = self.root(i)
        rootj = self.root(j)
        if rooti == rootj:
            return
        if rooti < rootj:
            self.parent[rootj] = rooti
        else:
            self.parent[rooti] = rootj

    def same(self, i, j):
        return self.root(i) == self.root(j)


###############################################################################


def main():
    n = intin()
    slist = input().split(' ')

    slist = set(slist)
    if len(slist) == 4:
        print('Four')
    else:
        print('Three')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from sys import stdin
N=int(stdin.readline().rstrip())
data=[(x) for x in stdin.readline().rstrip().split()]

flag=False
for i in data:
    if i == "Y":
        flag = True
if flag:
    print("Four")
else:
    print("Three")

Submission status: Accepted

Solution code:
input()
print('Three' if len(set(input().split()))==3 else 'Four')

Submission status: Accepted

Solution code:
# 入力
N=int(input())
l=list(map(str,input().split()))

ln=len(set(l))

if ln==3:
  print('Three')
else:
  print('Four')

Submission status: Accepted

Solution code:
n=int(input())
s=set(list(input().split()))
print("Four" if len(s)==4 else "Three")

Submission status: Accepted

Solution code:
N = int(input())
S = input().split()

if len(set(S)) == 4:
    print("Four")
else:
    print("Three")

Submission status: Accepted

Solution code:
N = int(input())
S = list(map(str, input().split()))
if len(set(S)) == 4:
    print("Four")
else:
    print("Three")

Submission status: Accepted

Solution code:
n=int(input())
if 'Y' in input().split():
  print("Four")
else:
  print("Three")

Submission status: Accepted

Solution code:
n = int(input())
s = list(input())
if s.count('Y') == 0:
    print("Three")
else:
    print("Four")

Submission status: Accepted

Solution code:
input();print("TFhoruere"[input().split().count('Y')>0::2])

Submission status: Accepted

Solution code:
n=int(input())
s=list(input().split())

if s.count("Y")>=1:
    print("Four")
else:
    print("Three")

Submission status: Accepted

Solution code:
n = int(input())
s = input()
l = []
for i in s:
	if i != ' ':l.append(i)
l = set(l)
print('Three' if len(l) == 3 else 'Four')

Submission status: Accepted

Solution code:
N = int(input())
arare = input().rstrip().split()
count = {"P": 0, "W": 0, "G": 0, "Y": 0}
for i in range(N):
  cur = arare[i]
  if cur == "P":
    count["P"] += 1
  elif cur == "W":
    count["W"] += 1
  elif cur == "G":
    count["G"] += 1
  else:
    count["Y"] += 1
print("Four" if count["Y"] >= 1 else "Three")

Submission status: Accepted

Solution code:
n=int(input())
s=list(map(str,input().split()))
if "Y" in s:
 print("Four")
else:
 print("Three")

Submission status: Accepted

Solution code:
n = input()
s = set(input().split())

print("Three" if len(s) == 3 else "Four")

Submission status: Accepted

Solution code:
N=int(input())
if "Y" in input():
  print("Four")
else:
  print("Three")

Submission status: Accepted

Solution code:
n = int(input())
fukuro = list(map(str,input().split()))
types = 'Three'
for i in range(len(fukuro)):
  if fukuro[i] == 'Y':
    types = 'Four'
    break
print(types)

Submission status: Accepted

Solution code:
a = input()
b = list(input().split())
if 'Y' in b:
    print('Four')
else:
    print('Three')

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    s = set([x for x in input().split()])

    if len(s) == 3:
        print("Three")
    elif len(s) == 4:
        print("Four")

if __name__ == "__main__":
  main()

Submission status: Accepted

Solution code:
N=int(input())
S=[str(i) for i in input().split()]

if S.count('Y')==0:
    print('Three')
else:
    print('Four')

Submission status: Accepted

Solution code:
N=int(input())
S=[str(i) for i in input().split()]
S=set(S)
if len(S)==3:
    print('Three')
else:
    print('Four')

Submission status: Accepted

Solution code:
n=int(input())
a=input().split()
if 'Y' in a:
    print('Four')
else:
    print('Three')

Submission status: Accepted

Solution code:
n = int(input()) 
if len(set([i for i in input().split()])) == 3:
  print("Three")
else:
  print("Four")

Submission status: Accepted

Solution code:
input();print("TFhoruere"[len(set(input().split()))>3::2])

Submission status: Accepted

Solution code:
N = int(input())
S = input().split()
num_kind = len(set(S))

print('Three' if num_kind == 3 else 'Four')

Submission status: Accepted

Solution code:
N = int(input())
S = set(input().split())

if len(S) == 3: print('Three')
else: print('Four')

Submission status: Accepted

Solution code:
n = input()
color = set(input().split())
if len(color) == 3:
  print("Three")
else:
  print("Four")

Submission status: Accepted

Solution code:
input()
s=input().split()
print('Four' if 'Y' in s else 'Three')

Submission status: Accepted

Solution code:
N = int(input())
for i in (list(input().split())):
        if i == "Y":
                print("Four")
                exit()

print("Three")

Submission status: Accepted

Solution code:
n = int(input())
s = list(map(str,input().split()))

if "Y" in s:
    print("Four")
else:
    print("Three")

Submission status: Accepted

Solution code:
N=int(input())
S=list(map(str,input().split()))
for s in S:
    if s=="Y":
        print("Four")
        quit()
print("Three")

Submission status: Accepted

Solution code:
n = int(input())
s = list(input().split())
print("Four" if s.count("Y") > 0 else "Three")

Submission status: Accepted

Solution code:
n = int(input())
s = list(input().split())

result = s.count("Y")

if result > 0:
    print("Four")
else:
    print("Three")

Submission status: Accepted

Solution code:
input()
l=input().split()
print("Four" if "Y" in l else "Three")

Submission status: Accepted

Solution code:
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    n = f()[0]
    s = input().split()

    for i in s:
        if i == 'Y':
            print('Four')
            return
    
    print('Three')

solve()

Submission status: Accepted

Solution code:
n=int(input())
List = list(input().split())
four = ["P", "W", "G", "Y"]
print("Four" if all((s in List) for s in four) else "Three")

Submission status: Accepted

Solution code:
n=int(input())
s=list(input().split())
print('Four' if 'Y' in s else 'Three')

Submission status: Accepted

Solution code:
n=int(input())
s=input().split()
if "Y" in s:
    print("Four")
else:
    print("Three")

Submission status: Accepted

Solution code:
N = int(input())

S = [x for x in input().split()]

for i in range(N):
  if S[i] == 'Y':
    print('Four')
    exit()
    
print('Three')

Submission status: Accepted

Solution code:
n = int(input())
s = input().split()

x = set(s)
answer = 'Three' if len(x) == 3 else 'Four'

print(answer)

Submission status: Accepted

Solution code:
N=int(input())
S=input().split()
Key=False
for i in range(N):
	if S[i]=='Y':
		Key=True
if Key==True:print('Four')
else:print('Three')

Submission status: Accepted

Solution code:


def read_input():
    n = int(input())
    slist = input().split()

    return n, slist

def submit():
    n, slist = read_input()

    if 'Y' in slist:
        print('Four')
    else:
        print('Three')


if __name__ == '__main__':
    submit()

Submission status: Accepted

Solution code:
N = int(input())
S = len(list(set(input())))
print("Three" if S == 4 else "Four")

Submission status: Accepted

Solution code:
input()
a = input()
print("Four" if 'Y' in a else "Three")

Submission status: Accepted

Solution code:
n=int(input())
c=list(input())
for i in c:
	if i=="Y":
		print('Four')
		break
else:
	print('Three')

Submission status: Accepted

Solution code:
N = int(input())
A = list(input().split())

if len(set(A)) == 3:
  print("Three")
else:
  print("Four")

Submission status: Accepted

Solution code:
n = int(input())
s = set(input().split())
print('Three' if len(s) == 3 else 'Four')

Submission status: Accepted

Solution code:
N=int(input())
L=list(input().split())
if "Y" in L:
  print("Four")
else :
  print("Three")

Submission status: Accepted

Solution code:
N = int(input())
S = list(input().split())
if len(set(S)) == 3:
	print("Three")
else:
	print("Four")

Submission status: Accepted

Solution code:
n=input()
s={str(x) for x in input().split()}
if len(s) == 4:
    print("Four")
else:
    print("Three")

Submission status: Accepted

Solution code:
N = int(input())
S = list(map(str,input().split()))
if "Y" in S:
    print("Four")
else:
    print("Three")

Submission status: Accepted

Solution code:
from collections import Counter
from functools import reduce
import bisect
import copy
import fractions
import math
# import statistics
import sys
import time
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def MI(): return map(int, sys.stdin.readline().split())
def II(): return int(sys.stdin.readline())
def IS(): return input()
def P(x): return print(x)
def C(x): return Counter(x)
def GCD_LIST(numbers):
    return reduce(fractions.gcd, numbers)
def LCM_LIST(numbers):
    return reduce(LCM, numbers)
def LCM(m, n):
    return (m * n // fractions.gcd(m, n))

n, s = II(), LS()
print("Four") if len(set(s)) == 4 else print("Three")

Submission status: Accepted

Solution code:
N = int(input())
S = set(input().split())
if len(S) == 3:
    print("Three")
else:
    print("Four")

Submission status: Accepted

Solution code:
n = int(input())
a = set(input().split())
if len(a) == 3 :
    print('Three')
else :
    print('Four')

Submission status: Accepted

Solution code:
n = int(input())
ans = {'G':0,'W':0,'P':0,'Y':0}

a = list(map(str,input().split())) 

for i in range(n):
    ans[a[i]]+=1
    
if ans['Y'] > 0:
    print("Four")
else:
    print("Three")

Submission status: Accepted

Solution code:
N = int(input())
S = list(map(str, input().split()))

four_flg = 0
for s in S:
  if s == 'Y':
    four_flg = 1
    break
if four_flg:
  print("Four")
else:
  print("Three")

Submission status: Accepted

Solution code:
# ABC089B - Hina Arare
# Editorial ver.
n = int(input())
lst = input().rstrip().split()
print("Four" if "Y" in lst else "Three")

Submission status: Accepted

Solution code:
# ABC089B - Hina Arare
n = int(input())
arare_set = set(input().rstrip().split())
print("Three" if len(arare_set) == 3 else "Four")

Submission status: Accepted

Solution code:
n=int(input())
l=list(map(str,input().split()))
print('Four' if 'Y' in l else 'Three')

Submission status: Accepted

Solution code:
N = int(input())
S = list(map(str, input().split()))

s = list(set(S))
if 4 == len(s):
  print('Four')
else:
  print('Three')

Submission status: Accepted

Solution code:
input()
S = input()
if "Y" in S:
    print("Four")
else:
    print("Three")

Submission status: Accepted

Solution code:
N = int(input())
S = list(map(str, input().split()))
flag = False

for s in S:
    if s == 'Y':
        flag = True

if flag:
    print('Four')
else:
    print('Three')

Submission status: Accepted

Solution code:
_=input()
print("Four" if "Y" in input() else "Three")

Submission status: Accepted

Solution code:
_=input()
print("Four" if len(set(map(str,input().split())))==4 else "Three")

Submission status: Accepted

Solution code:
_=input()
print("Four" if len(set(list(map(str,input().split()))))==4 else "Three")

Submission status: Accepted

Solution code:
n = int(input())
s = list(input().split())

if s.count('Y') > 0:
    print('Four')
else:
    print('Three')

Submission status: Accepted

Solution code:
N = int(input())
S = input().split()
if len(set(S)) == 3:
  print('Three')
else:
  print('Four')

Submission status: Accepted

Solution code:
n,*s=open(0).read().split();print('TFhoruere'[len(set(s))>3::2])

Submission status: Accepted

Solution code:
N = int(input())
s = [i for i in input().split()]
if 'Y' in s:
    print('Four')
else:
    print('Three')