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:
import sys, collections
lines = [s.rstrip("\n") for s in sys.stdin.readlines()]
n, = [int(num) for num in lines.pop(0).split(" ")]
s_list = lines.pop(0).split(" ")
c = collections.Counter(s_list)
if len(c) == 3:
    print("Three")
elif len(c) == 4:
    print("Four")

Submission status: Accepted

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

# 4種類か3種類かは、黄色Yが入ってるかどうか

else:
    print('Three')

Submission status: Accepted

Solution code:
def decision(pack: list) -> str:
    if "Y" in pack:
        return "Four"
    return "Three"


if __name__ == "__main__":
    n = int(input())
    pack = list(map(str, input().split()))
    print(decision(pack))

Submission status: Accepted

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

Submission status: Accepted

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

pp = 0
wp = 0
gp = 0
yp = 0


for i in range(N):
    if color[i] == 'P' and pp == 0:
        pp += 1
    if color[i] == 'W' and wp == 0:
        wp += 1
    if color[i] == 'G' and gp == 0:
        gp += 1
    if color[i] == 'Y' and yp == 0:
        yp += 1

if (pp + wp + gp + yp) == 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=int(input())
s=input()
if 'Y' in s:print("Four")
else:print("Three")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

n=input()
s=list(map(str, input().split()))

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

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())


quantity = len(list(set(S)))


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

Submission status: Accepted

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

Four = ['P', 'Y', 'G', 'W']
ml = all(word in s for word in Four)

if ml:
    print('Four', flush=True)
else:
    print('Three', flush=True)

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

if 'P' and 'W' and 'G' and 'Y' in S:
    print('Four')
else:
    print('Three')

Submission status: Accepted

Solution code:
#https://atcoder.jp/contests/abc089/tasks/abc089_b
S_list = [input() for i in range(2)]
N = map(int,S_list[0].split())    
A_list = set(S_list[1].split())
four = {"P","W","G","Y"}
if len(A_list & four) == 3:
    result ="Three"
else:
    result ="Four"
print(result)

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 = list(map(str,input().split()))

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = list(input().split())
P = s.count("P")
W = s.count("W")
G = s.count("G")
print("Three" if n==P+W+G else "Four")

Submission status: Accepted

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

Submission status: Accepted

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

def answer(N:int, s: str) -> str:
    if 'Y' in s:
	    return 'Four'
    else:
	    return 'Three'
    
    
print(answer(N, s))

Submission status: Accepted

Solution code:
N=int(input())
S=input().split()
print("Three"if len(set(S))&1else "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())
S = list(map(str, input().split()))

if 'Y' in S:
    answer = 'Four'
else:
    answer = 'Three'
print(answer)

Submission status: Accepted

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

candy_list = ['P', 'W', 'G', 'Y']
answer = 0
for i in range(4):
    if candy_list[i] in S:
        answer += 1

if answer == 3:
    print('Three')
if answer == 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:
# B - Hina Arare

# N
N = int(input())
my_list = list(input().split())

arare_list = ['P', 'W', 'G', 'Y']
my_list_only = set(my_list)
count = 0

for i in range(0, 4):
    if arare_list[i] in my_list_only:
        count += 1

if count == 3:
    answer = 'Three'
if count == 4:
    answer = 'Four'

print(answer)

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:
i=input()
Si=input()
if 'Y' in Si:
    print('Four')
else:
    print('Three')

Submission status: Accepted

Solution code:
# 数値と文字の取得
num = int(input())
colors = list(map(str,input().split()))

# 黄色があるか判定し結果を出力
if colors.count("Y") >0:
    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")
        break
else:
    print("Three")

Submission status: Accepted

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

if len([arare for arare in set(arares) if arares.count(arare) > 0]) == 3:
    print('Three')
elif len([arare for arare in set(arares) if arares.count(arare) > 0]) == 4:
    print('Four')

Submission status: Accepted

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

# 1つの袋があり、ひなあられが N個 入っています。
# 桃色を P、白色を W、緑色を G、黄色を Y と表したとき、袋からひなあられを1粒ずつ取り出していったところ、i番目に取り出したひなあられの色は Si でした。
# この袋に 3種類 のひなあられが入っていた場合は Three、4種類 のひなあられが入っていた場合は Four と出力してください。

if "Y" in color:
    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:
n = int(input())
colors = list(map(str, input().split()))

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

Submission status: Accepted

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

def ans089(N:int, S:list):
    S=S.split()
    if len(set(S))==4:
        return("Four")
    elif len(set(S))==3:
        return ("Three")
print(ans089(N,S))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**9)

def mi(): return map(int,input().split())
def ii(): return int(input())
def isp(): return input().split()
def deb(text): print("-------\n{}\n-------".format(text))

INF=10**20
class Counter:
    def __init__(self):
        self.dict = {}

    def add(self,x):
        if x in self.dict: self.dict[x] += 1
        else: self.dict[x] = 1

    def decrement(self,x):
        self.dict[x] -= 1
        if self.dict[x] <= 0:
            del self.dict[x]

    def get_dict(self):
        return self.dict

def main():
    N = ii()
    S = list(isp())

    C = Counter()
    for s in S:
        C.add(s)
    
    c = C.get_dict()
    print("Three" if len(c.keys()) == 3 else "Four")




if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(input().split())
# aの中に黄色Yが含まれていればFourと出力
if "Y" in a:
    print("Four")
# aの中に黄色Yが含まれてなけれはThreeと出力
else:
    print("Three")

Submission status: Accepted

Solution code:
snack_num = int(input())
a = map(str, input().split())
color_set = set(a)

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

Submission status: Accepted

Solution code:
def answer(n: str, s: str) -> str:
    return 'Three' if len(set(s.split())) == 3 else 'Four'


def main():
    n = input()
    s = input()
    print(answer(n, s))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def atc_089b(input_value: str) -> str:
    N = input_value[0]
    Si = input_value[1]
    colors = ["P" in Si, "W" in Si, "G" in Si, "Y" in Si]
    if colors.count(True) == 3:
        return "Three"
    elif colors.count(True) == 4:
        return "Four"
    else:
        return "other"

N_input = input()
Si_input = input()
print(atc_089b([N_input, Si_input]))

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()
print('Three' if len(set(input().split())) == 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:
# B - Hina Arare
# https://atcoder.jp/contests/abc089/tasks/abc089_b

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

result = 'Three'

if s.count('Y') > 0:
    result = 'Four'

print(result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    s_set = set(input().split())
    if "Y" in s_set:
        print("Four")
    else:
        print("Three")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

cnt = len(set(S))
print("Three" if cnt == 3 else "Four")

Submission status: Accepted

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

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

color = []

for i in S:
  if i in color:
    pass
  else:
    color.append(i)
    
if len(color) == 4:
  print('Four')
else:
  print('Three')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
list_s = [s for s in input().split()]
if 'P' in list_s and 'W' in list_s and 'G' in list_s and 'Y' in list_s:
    print("Four")
else: print("Three")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    n  = int(input())
    s = list(input().split())
    hina = ['P','W','G','Y']
    hina_type = 0
    for i in hina:
        if i in s:
            hina_type += 1
    if hina_type == 3:
        print('Three')
    if hina_type == 4:
        print('Four')



if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    N = int(readline())
    S = input().split()

    ans = len(set(S))

    if ans == 4:
        print("Four")
    else:
        print("Three")


if __name__ == '__main__':
    main()

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(input().split())
print("Four") if "Y" in s else print("Three")

Submission status: Accepted

Solution code:
_,*s=map(str,open(0).read().split())
print('TFhoruere'[len(set(s))==4::2])

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 = set(input().split())
print('Three' if len(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())
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(map(str, input().split()))
if s.count('Y') == 0:
    print('Three')
else:
    print('Four')

Submission status: Accepted

Solution code:
n = int(input())
l = input().split()
print("Four" if "Y" in l else "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())
S = list(input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

N = int(input())
S = list(input().split())

flag=[0]*4
for i in range(N):
    if S[i]=='P':
        flag[0]=1
    elif S[i]=='W':
        flag[1]=1
    elif S[i]=='G':
        flag[2]=1
    elif S[i]=='Y':
        flag[3]=1

if sum(flag)==4:
    print('Four')
else:
    print('Three')

Submission status: Accepted

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

if "P" and "G" and "W" and "Y" in s:
    print("Four")
else:
    print("Three")

Submission status: Accepted

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

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:
from collections import Counter
n = int(input())
s = list(map(str, input().split()))
s = Counter(s).most_common()
if len(s) == 3:
    print('Three')
else:
    print('Four')

Submission status: Accepted

Solution code:
def resolve():
    n = int(input())
    cl = list(map(str, input().split()))
    isY = False
    for i in cl:
        if i == "Y":
            isY = True
    if isY:
        print("Four")
    else:
        print("Three")
resolve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
S=list(map(str,input().split()))
flg=0
for i in range(N) :
  if S[i]=="Y" :
    flg=1
if flg==1 :
  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("Three" if len(set(input().split())) == 3 else "Four")

Submission status: Accepted

Solution code:
n = int(input())
s = list(map(str, input().split()))
dic = {'P':0, 'W':0, 'G':0, 'Y':0}
for i in range(n):
    dic[s[i]] += 1
cnt = 0
for i in dic.keys():
    if dic[i] > 0:
        cnt += 1
if cnt == 3:
    print("Three")
elif cnt == 4:
    print("Four")

Submission status: Accepted

Solution code:
n = int(input())
s = input().split()
a = [0]*4

for i in s:
    if i == 'P':
        a[0] += 1
    elif i == 'W':
        a[1] += 1
    elif i == 'G':
        a[2] += 1
    elif i == 'Y':
        a[3] += 1

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, *S = open(0).read().split()

print('Four' if 'Y' in S else 'Three')

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N = int(input())
Ss = list(input().split())

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

Submission status: Accepted

Solution code:
n, *a = open(0).read().split()
b = len(set(a))
if b == 3:
    print("Three")
elif b == 4:
    print("Four")

Submission status: Accepted

Solution code:
N = int(input())
As = list(input().split())
if 'Y' in As:
  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:
import sys

N = int(sys.stdin.readline())
S = sys.stdin.readline().strip().split()
hina = set()
for s in S:
    hina.add(s)

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

Submission status: Accepted

Solution code:
from collections import Counter
N = int(input())
S = list(input().split())
S = Counter(S)

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

print(ans)

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())
A = list(map(str,input().split()))
S = set(A)
if len(S) == 4:
  print("Four")
else:
  print("Three")

Submission status: Accepted

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

Submission status: Accepted

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

result = set(S)

if len(result) == 4:
    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 = int(input())
lists = input().split()

sets = set(lists)
if len(sets) == 3:
    ans = 'Three'
else:
    ans = 'Four'

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    N = I()
    S = LSS()

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

if __name__ == '__main__':
    resolve()

Submission status: Accepted

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

res = []
ans = 0
for i in s:
  if i not in res:
    res.append(i)
    ans += 1
    
if ans == 3:
  print('Three')
else:
  print('Four')

Submission status: Accepted

Solution code:
n = int(input())
s = list(map(str,input().split()))
dic = {}
for i in range(n):
    dic.setdefault(s[i],0)
    dic[s[i]] += 1
#print(len(dic))
if len(dic)==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:
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=input()
if s.count('Y'):
  print('Four')
else:
  print('Three')

Submission status: Accepted

Solution code:
input();print('TFhoruere'['Y'in[*input()]::2])

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:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

n = ri()
li = list(rs())
if 'Y' in li:
  print('Four')
else:
  print('Three')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]
#a = [list(input()) for _ in range(n)]
#a = [int(input()) for _ in range(n)]

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

tmp = set(s)

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

Submission status: Accepted

Solution code:
N=int(input())
L=list(input().split())
L=set(L)
if len(L)==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:
N = int(input())
S = input()
for i in range(N):
  if S[2 * i] == "Y":
    print("Four")
    break
  if i == N - 1:
    print("Three")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input()
S = input()

print('Four' if 'Y' in S else 'Three')

Submission status: Accepted

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

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

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
from collections import Counter

read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


def main():
    N = int(input())
    S = list(input().split())
    L = len(Counter(S))
    if L == 3:
        print('Three')
    else:
        print('Four')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    N = int(readline())
    S = readline().split()

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

    return


if __name__ == '__main__':
    main()

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:
input()
print("Four" if 'Y' in input() else "Three")

Submission status: Accepted

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

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s_list = list(input().split())
# print(s_list)

l = []
for s in s_list:
    # print(s)
    if not s in l:
        l.append(s)
# print(l)
if len(l) == 4:
    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:
n = int(input())
ans = len(set(list(input().split())))
if ans == 3:
    print('Three')
else:
    print('Four')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# # Make IO faster
# import sys
# input = sys.stdin.readline

# # get single (or) multiple str
# X = input()

# # get single int
# N = int(input())
# # get multiple int (e.g., 2)
# X, Y = map(int, input().split())
# # get multiple int (e.g., 2) for N lines
# XY = [list(map(int, input().split())) for _ in range(N)]

# from IPython import embed; embed(); exit();

# 全部入り
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
import numpy as np
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()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

from collections import Counter
N = INT()
S = input().split(" ")
# print()
if len(Counter(S)) == 3:
    print("Three")
else:
    print("Four")