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:
input()
for s_i in input().split():
    if s_i == "Y":
        print("Four")
        exit()
print("Three")

Submission status: Accepted

Solution code:
#テストファイルで実行する時
import sys
if sys.platform =='ios':
    sys.stdin=open('input_file.txt')


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 = [str(i) for i in input().split()]

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

Submission status: Accepted

Solution code:
n = int(input())

s = set([i for i in input().split()])

print('Four' if len(s) == 4 else 'Three')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter
n = int(input())
C = Counter(list(input()))
print('Three') if len(C) == 4 else print("Four")

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

N = INT()
S = input().split()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
arare = input().split()
g = 0
w = 0
p = 0
y = 0
for i in arare:
  if i=='G':
    g+=1
  elif i=='W':
    w+=1
  elif i=='P':
    p+=1
  else:
    y+=1
if g>0 and w>0 and p>0 and y>0:
  print("Four")
else:
  print("Three")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = input()
s = list(input().split())
print('TFhoruere'['Y' in s::2])

Submission status: Accepted

Solution code:
##### 解けた #####

import numpy as np

N=int(input())
u=len(np.unique(np.asarray(input().split(" "))))

if u==3: # 3種類の場合
    print("Three")
elif u==4: # 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(input().split(' '))

ans = set(s)

print('Three' if len(ans) == 3 else 'Four')

Submission status: Accepted

Solution code:
#89b
import collections

N = int(input())
S_list = [str(e) for e in input().split()]

counted = collections.Counter(S_list)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys, math, itertools, heapq, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
sys.setrecursionlimit(10**8)
inf = float('inf')
ans = count = 0

n=int(input())
S=input()
for si in S:
    if si=="Y":

        print("Four")
        exit()
print("Three")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def examB():
    N = I()
    St = LS()
    d = defaultdict(str)
    for s in St:
        d[s] = 1
    if len(d)==3:
        ans = "Three"
    elif len(d)==4:
        ans = "Four"
    if ans:
        print(ans)

import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examB()

Submission status: Accepted

Solution code:
n = input()
s_list = list(map(str, input().split()))
if s_list.count('Y') > 0:
    print('Four')
else:
    print('Three')

Submission status: Accepted

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

count=[]
for i in s:
  if i not in count:
    count.append(i)
if (len(count)==1):print('One'),
if (len(count)==2):print('Two'),
if (len(count)==3):print('Three'),
if (len(count)==4):print('Four')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
import numpy as np
import math

n = int(stdin.readline().rstrip())
s = stdin.readline().rstrip()
s = [str(i) for i in s]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
ans = False
s = list(input().split())
for i in s:
    if(i == "Y"):
        ans = True
if(ans):
    print("Four")
else:
    print("Three")

Submission status: Accepted

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

ans = "Three"
for i in range(len(s)):
    if s[i] == "Y":
        ans = "Four"
        break
        
print(ans)

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 = input().split()

if "Y" in S:
    ans = "Four"
else:
    ans = "Three"

print(ans)

Submission status: Accepted

Solution code:
# ABC 089: B – Hina Arare
n = int(input())
s = input().split()

arares = set(s)

print('Three' if len(arares) == 3 else 'Four')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter
n = int(input())
s = list(map(str, input().split()))
if len(Counter(s)) == 4:
	print ("Four")
else:
	print ("Three")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
a=sorted(set(input().split()))
b=["G","P","W","Y"]
print("Four" if a==b else "Three")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
lists=list(map(str,input().split()))
import collections
a=collections.Counter(lists)
if len(a)==4:
    print("Four")
else:
    print("Three")

Submission status: Accepted

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

P, W, G, Y = 0, 0, 0, 0

for i in range(N):
  if S[i] == 'P':
    P = 1
  elif S[i] == 'W':
    W = 1
  elif S[i] == 'G':
    G = 1
  else:
    Y = 1
    
if P+W+G+Y == 3:
  print('Three')
else:
  print('Four')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(str,input().split()))
ans = "Three"
for aa in a:
    if aa == "Y":
        ans = "Four"
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
s = [str(i) for i in input().split()]
if len(list(set(s))) == 4:
    print('Four')
elif len(list(set(s))) == 3:
    print('Three')
else:
    pass

Submission status: Accepted

Solution code:
def main(n, s):
    a = set(s)

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


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

    main(n, s)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1

def main():
    input()
    s=input()
    print("Four") if s.count("Y") else print("Three")

main()

Submission status: Accepted

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

print('Three')

Submission status: Accepted

Solution code:
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

n = inp()
s = list(sys.stdin.readline().split())
cnt = Counter(s)
if len(cnt.keys()) == 4:
    print('Four')
else:
    print('Three')

Submission status: Accepted

Solution code:
num = input()
l = []
l = input().split()
s = set(l)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#                         author:  kagemeka 
#                         created: 2019-11-06 16:52:04(JST)
import sys
# import collections
# import math
# import string
# import bisect
# import re
# import itertools
# import statistics

def main():
    n, *s = sys.stdin.read().split()
    l = len(set(s))
    if l == 3: ans = 'Three'
    else: ans = 'Four'
    print(ans)


if __name__ == "__main__":
    # execute only if run as a script
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
s_list = [s for s in input().split()]
s_set = set(s_list)

if len(s_set) == 3:
  print('Three')
if len(s_set) == 4:
  print('Four')

Submission status: Accepted

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

length = len(set(list_s))

if length == 3:
    print('Three')

if length == 4:
    print('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 = input().split()

print('Three' if len(set(S)) == 3 else '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())
sn = input().split()
if 'Y' in sn:
    print('Four')
else:
    print('Three')

Submission status: Accepted

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

Submission status: Accepted

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

Ans = "Three"
for s in S:
    if s=="Y":
        Ans = "Four"
        break

print(Ans)

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())
S = input().split()
ans = {3:"Three",4:"Four"}
print(ans[len(set(S))])

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())
s = list(input().split())
if len(set(s)) == 3: print("Three")
else: print("Four")

Submission status: Accepted

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


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
s=(input())
for i in range(n):
    if s[i]=='Y':
        print('Four')
        break
    if i==n-1:
        print('Three')

Submission status: Accepted

Solution code:
n=int(input())
s=(input())
for i in range(n):
    if s[i]=='Y':
        print('Four')
        break
    else:
        i+=1
    if i==n-1:
        print('Three')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=input()
S=list(map(str,input().split()))
print(['Three','Four'][len(set(S))-3])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
li=list(input().split())
c=0
for n in range(N):
  if li[n]=='Y':
    c=1
    break
if c==0:
  print('Three')
else:
  print('Four')

Submission status: Accepted

Solution code:
N = int(input())
S = [x for x in 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()))
print('Four' if len(set(s))==4 else 'Three')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
s=list(map(str,input().split()))
new_s=set(s)
if len(new_s)==3:
    print('Three')
elif len(new_s)==4:
    print('Four')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#2019/10/15
N, *S = open(0).read().split()
print("Three" if len(set(S))==3 else "Four" )

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = set(map(str, input().split()))
print("Four" if len(s) == 4 else "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:
n=input()
s=input().split()
print("Four" if "Y" in s else "Three")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=int(input());s=input().split()
print('TFhoruere'['Y' in s::2])

Submission status: Accepted

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

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:
N = int(input())
S = list(input().split())
if S.count('Y') > 0:
    print('Four')
else:
    print('Three')

Submission status: Accepted

Solution code:
def slove():
    import sys
    import collections
    input = sys.stdin.readline
    n = int(input().rstrip('\n'))
    s = collections.Counter(list(map(str, input().rstrip('\n').split())))
    print("Three" if len(s) == 3 else "Four")


if __name__ == '__main__':
    slove()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
S = list(input().split())
ind = 0
for i in range(N):
    if S[i]=="Y":
        ind = 1
        break
if ind==1:
    print("Four")
else:
    print("Three")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans=False
for i in s:
    if i == 'Y':
        ans=True
        break

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

Submission status: Accepted

Solution code:
from collections import Counter
N = int(input())
S = list(input().split())
S = Counter(S)
if len(S.keys())==4:
  print("Four")
else:
  print("Three")

Submission status: Accepted

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

bb089()

Submission status: Accepted

Solution code:
import sys
from functools import reduce
import copy
import math
from pprint import pprint


sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def int_inputs(num_of_input):
    ins = [int(input()) for i in range(num_of_input)]
    return ins


def solve(inputs):
    dots = inputs[0].split(' ')
    types = set()
    for d in dots:
        types.add(d)
        if len(types) == 4:
            return "Four"
    return "Three"


def string_to_int(string):
    return list(map(int, string.split()))


if __name__ == "__main__":
    input()
    ret = solve(inputs(1))
    print(ret)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
S = list(map(str,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())
s = [str(_) for _ in input().split()]
ans =0
for i in range(len(s)):
  if s[i]=='Y':
    ans =4
  elif len(set(s))==4:
    ans =4
  else:
    ans =3
print('Four' if ans ==4 else 'Three')

Submission status: Accepted

Solution code:
# ABC089 B - Hina Arare
N = int(input())
S = list(map(str,input().split()))

M = set()

for s in S:
    M.add(s)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
s=list(input().split())
if len(set(s))==3:
    print("Three")
elif len(set(s))==4:
    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())
s = input().split()
if 'Y' in s:
    print("Four")
else:
    print("Three")

Submission status: Accepted

Solution code:
N = int(input())
S = list(input().split())
res = [0] * 4

for s in S:
    if s == 'G' and res[0] == 0:
        res[0] += 1
    elif s == 'W' and res[1] == 0:
        res[1] += 1
    elif s == 'Y' and res[2] == 0:
        res[2] += 1
    elif s == 'P' and res[3] == 0:
        res[3] += 1

if sum(res) == 3:
    print('Three')
else:
    print('Four')

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 = int(input())
print("Four" if len(set(input().split())) == 4 else "Three")

Submission status: Accepted

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

type_list = []
for _ in color_list:
    if _ in type_list:
        pass
    else:
        type_list.append(_)

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

Submission status: Accepted

Solution code:
input();print(['Three','Four'][len(set(input().split()))==4])

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:
n=input()
a=input().split()
print(("Three","Four")[len(set(a))==4])

Submission status: Accepted

Solution code:
from collections import Counter
input()
S = Counter(list(input().split()))
print('Four' if len(S)==4 else 'Three')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(input())

for i in range(n):
  if a[i]=='Y': 
    print('Four')
    break
else: print('Three')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
S = input().split()
for i in S:
  if i == "Y":
    print("Four")
    exit()
print("Three")

Submission status: Accepted

Solution code:
n=int(input())
a=list(input().split())
flag=0
for i in range(n):
    if a[i]=='Y':
        flag+=1
if flag>0:
    print('Four')
else:
    print('Three')

Submission status: Accepted

Solution code:
n=int(input())
s = input().split()
bag={}
cnt=0
for a in s:
    if a not in bag:
        cnt+=1
        bag[a]=1
    else:
        bag[a]+=1
if cnt == 3:
    print("Three")
else:
    print("Four")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC089B - Hina Arare
def main():
    N, *S = open(0).read().split()
    flg = "Y" in S
    print("Four" if flg else "Three")


if __name__ == "__main__":
    main()

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(input().split())

for c in S:
  if c == 'Y':
    print("Four")
    exit()
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:
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
n=int(input())
m=list(map(str,input().split()))

s=set(m)

if len(s)==4:
	print("Four")
else:
	print("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:
_ = int(input())
print('Three' if len(set(input().split())) == 3 else 'Four')

Submission status: Accepted

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

print('Four' if len(s) == 4 else 'Three')

Submission status: Accepted

Solution code:
# ARC 089 B

def resolve():
  n = int(input())
  s = set()
  for c in input().split():
    s.add(c)

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


if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input()
ls = list(input().split())
if ls.count('Y') > 0:
    print('Four')
else:
    print('Three')

Submission status: Accepted

Solution code:
n = int(input())
ls = [s.rstrip() for s in input().split()]
if ls.count('Y') > 0:
    print('Four')
else:
    print('Three')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
S = list(map(str,input().split()))
k = []
for i in range(N):
    if S[i] not in k:
        k.append(S[i])
if len(k) == 3:
    print("Three")
else:
    print("Four")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

# input
N = int(input())
S = list(map(str, input().split()))

# solve & output
print('Four' if S.count('Y') >= 1 else 'Three')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
print([0,0,0,'Three','Four'][len(set(list(input().split())))])

Submission status: Accepted

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

for i in S:
    if i == "Y":
        print("Four")
        sys.exit()
        
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 = int(input())
S = set(list(map(str, input().split())))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC089b
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

input()
print('Four' if len(set(input().split())) == 4 else 'Three')

Submission status: Accepted

Solution code:
n = int(input())
s = input().split()
flag = True
for i in range(n):
    if s[i] == 'Y':
        flag = False
        break
if flag:
    print('Three')
else:
    print('Four')

Submission status: Accepted

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

ans = "Three"
for i in range(N):
  if S[i] == "Y":
    ans = "Four"
    break
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
S = [str for str in input().split()]
if "Y" in S:
  print("Four")
else:
  print("Three")

Submission status: Accepted

Solution code:
n=int(input())
s=[j for j in input().split()]
for i in s:
    if i=="Y":
        print("Four")
        exit()
print("Three")

Submission status: Accepted

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

ss = set()
for i in range(n):
    ss.add(s[i])
print("Three" if len(ss) == 3 else "Four")

Submission status: Accepted

Solution code:
N=int(input())
ls=input().split()
for i in range(N):
  x=ls[i]
  if x=="Y":
    print("Four")
    break
else:
  print("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())

print("Four" if len(set(map(str, input().split()))) >= 4 else "Three")

Submission status: Accepted

Solution code:
n=int(input())
s=list(map(str,input().split()))
print('Three' if len(set(s))==3 else '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=input()
l=map(str, input().split())
print('Three' if len(set(l))==3 else 'Four')

Submission status: Accepted

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

Submission status: Accepted

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

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