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:
zenbu = int(input())
mame = [i for i in input().split()]

kiiro = 0

for moji in mame:
    if moji == 'Y':
       kiiro = 1
       break

if kiiro == 1:
    print('Four')
else:
    print('Three')

Submission status: Accepted

Solution code:
zenbu = int(input())
mame = [i for i in input().split()]

kiiro = 0

for mame_1 in mame:
    if mame_1 == 'Y':
           kiiro = 1
           break

if kiiro == 1:
        print('Four')
else:
        print('Three')

Submission status: Accepted

Solution code:
#入力受け取り
arare_kazu = int(input())
arare_color = [i for i in input().split()]
#print(arare_color)

#判定
if 'Y' in arare_color:
    print('Four')
else:
    print('Three')

Submission status: Accepted

Solution code:
num = int(input())

InA = [i for i in input().split()]

flgYel = 0

for cnt in range(num):
    if InA[cnt] == "Y":
        flgYel = 1
        break

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

Submission status: Accepted

Solution code:
n = int(input())
s = list(input().split())
print(('Three','Four')['Y' in s])

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
N=int(input())
n = list(map(str, input().split()))
listemp=[]
for i in n:
    if i not in listemp:
        listemp.append(i)

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

Submission status: Accepted

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

Submission status: Accepted

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

N = int(input())
hnarrs = input()

if hnarrs.find("Y") == -1:
    print("Three")
else:
    print("Four")

Submission status: Accepted

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

Submission status: Accepted

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


def hina_arare(colors):
    for color in colors:
        if color == "Y":
            return "Four"
    return "Three"


print(hina_arare(colors))

Submission status: Accepted

Solution code:
while True:
    N = int(input())
    if N < 1 or N >100:
        continue
    b = input().split()
    a = [i for i in b]
    if 'P' and 'W' and 'G' and 'Y' in a :
        print('Four')
        break
    else:
        print('Three')
        break

Submission status: Accepted

Solution code:
#!C:\Users\daichi\Anaconda3/python.exe
# -*- coding: utf-8 -*-

N = int(input())
S =  input().split()
T = [0,0,0,0]

#for i in range(N):
 #   S[i] = input()
i=0
for i in range(N):
    if(S[i]=='P'):
        T[0] = 1
    if(S[i]=='W'):
        T[1] = 1
    if(S[i]=='G'):
        T[2] = 1
    if(S[i]=='Y'):
        T[3] = 1

Sum = 0
i=0
for i in range(4):
    Sum = Sum + T[i]
    
if(Sum == 3):
    print("Three")
if(Sum == 4):
    print("Four")

Submission status: Accepted

Solution code:
N = int(input())
print("Four" if "Y" in list(s for s in input().split()) 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 = int(input())
S = list(input().split())
 
if 'Y' in S:
    print('Four')
else:
    print('Three')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
li = list(input().split())
di = {0:"One",1:"One",2:"Two",3:"Three",4:"Four"}
print(di[len(set(li))])

Submission status: Accepted

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

def main():
    ans = "Four" if "Y" in S else "Three"
    print(ans)

if __name__ == "__main__":
    main()

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

Submission status: Accepted

Solution code:
colors = list("PWGY")
dict = {}
for c in colors:
    dict[c] = False
N = int(input())
for x in input().split():
    dict[x] = True
ans = 0
for c in colors:
    ans += 1 if dict[c] else 0
if ans == 3:
    print("Three")
else:
    print("Four")

Submission status: Accepted

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

Submission status: Accepted

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

si = [print('Four')if 'Y' in s else print('Three') ]

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input()
seq = input().split(' ')

if 'Y' in seq:
    print("Four")
else:
    print("Three")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
if(input().find("Y") != -1):
    print("Four")
else:
    print("Three")

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 "Y" in S else"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(map(str, input().split()))
flag = False
for i in range(n):
    if s[i] == 'Y':
        flag = True
if flag:
    print('Four')
else:
    print('Three')

Submission status: Accepted

Solution code:
# your code goes here
N = int(input())
arare = input().split()

flag = False
for i in range(N):
	if arare[i] == 'Y':
		flag = True
		break
if flag:
	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 = input()
print("Four" if len(set(input()))==5 else "Three")

Submission status: Accepted

Solution code:
araresuu = int(input())
sikou = input().split()
kaisuu = 0

for i in sikou:
    if i == 'Y':
        print('Four')
        break
    kaisuu += 1

if kaisuu == araresuu:
    print('Three')

Submission status: Accepted

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

if len(A)==4:print("Four")
elif len(A)==3:print("Three")
elif len(A)==2:print("Two")
elif len(A)==1:print("One")
else: print("Ha?")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
s = list(map(str, input().split()))
print(["Four", "Three"][len(set(s))==3])

Submission status: Accepted

Solution code:
N = int(input())
S = input().split()
count = 0
for i in S:
    if i == "Y":
        count += 1
if count != 0:
    print("Four")
else:
    print("Three")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

flag = False

for i in range(N):
    if S[i] == "Y":
        flag = True

if flag == False:
    print("Three")
else:
    print("Four")

Submission status: Accepted

Solution code:
n = int(input())

s = input().split()

for i in range(n):
    if s[i] == 'Y':
        print("Four")
        break
    elif i == n-1:
        print("Three")
        break

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a = int(input())
b = list(map(str,input().split()))


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

for i in b:
    if i == 'G':
        G +=1
    elif i =='P':
        P +=1
    elif i =='W':
        W += 1
    else:
        Y += 1

if G != 0 and P != 0 and W != 0 and Y != 0:
    print('Four')
else:
    print('Three')

Submission status: Accepted

Solution code:
N = int(input())

Color = input().split()

num = len(set(Color))

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

Submission status: Accepted

Solution code:
N=(int,input())
s = input().split()
for i in  s:
    if i =="Y":
        print ("Four")
        break
 
else:
    print ("Three")

Submission status: Accepted

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

for i in s:
    if i == "Y":
        print("Four")
        break

else:
    print("Three")

Submission status: Accepted

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

if rawS.find('Y') != -1:
    print('Four')
else:
    print('Three')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=int(input())
p = input().split()
c = ["P","W","G","Y"]
k = [int(c[i] in p) for i in range(4)]
k = sum(k)
if k == 3:
  print("Three")
else:
  print("Four")

Submission status: Accepted

Solution code:
import sys
import math
import collections
import itertools
import array
import inspect

# Set max recursion limit
sys.setrecursionlimit(10000)

# Debug output
def chkprint(*args):
    names = {id(v):k for k,v in inspect.currentframe().f_back.f_locals.items()}
    print(', '.join(names.get(id(arg),'???')+' = '+repr(arg) for arg in args))

# Binary converter
def to_bin(x):
    return bin(x)[2:]

# --------------------------------------------

dp = None

def main():
    N = int(input())
    ArareList = list(input())

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

main()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

color = [0 for i in range(4)]#P,W,G,Y

for i in range(n):
    if s[i]=="Y":
        print("Four")
        exit()
print("Three")

Submission status: Accepted

Solution code:
n = int(input())
contents_str = input()
contents = contents_str.split()
solution = 'Three'
for color in contents:
    if color == 'Y':
        solution = 'Four'
        break
print(solution)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
lis = list(map(str,input().split()))
if "Y" in lis:
  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())
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:
# -*- coding: utf-8 -*-
n = int(input())
arare = input().split()
if ('Y' in arare) == True:
    print('Four')
else:
    print('Three')

Submission status: Accepted

Solution code:
import re
import sys

if __name__ == '__main__':
    N = int(input())
    li = raw_input().split()
    d = dict()
    for l in li:
        d[l] = 1
    if len(d) == 4:
        print 'Four'
    else:
        print 'Three'

Submission status: Accepted

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

Submission status: Accepted

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

if s.count('Y')<1:
    print("Three")
else:
     print("Four")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
l = input().split()
l = set(l)
length = len(l)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

ball_list = map(str, input().split())
type_num = len(list(set(ball_list)))

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

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:
n = int(input())                                                                                                           
s = input().split()

print("Three" if s.count('Y') == 0 else "Four")

Submission status: Accepted

Solution code:
N = input()
S = raw_input().replace(" ", "")
print "Four" if len(set(S)) == 4 else "Three"

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#__author__ = "tatuo"
#__date__ = "$Mar 3, 2018 12:34:20 PM$"

import math
import re
import sys


def getinputdata():

    # 配列初期化
    array_result = []
    
    data = input()

    
    array_result.append(data.split(" "))

    flg = 1

    try:


        while flg:

            data = input()

            array_temp = []

            if(data != ""):
                
                array_result.append(data.split(" "))

                flg = 1

            else:

                flg = 0
    finally:


        return array_result




arr_data = getinputdata()

n=int(arr_data[0][0])

#print(arr_data[1])

if("Y" in arr_data[1]):
    
    print("Four")
    
else:
    
    print("Three")

Submission status: Accepted

Solution code:
N = int(input())
S = input().split()
dict = {}
for i in range(N):
    if(S[i] in dict):
        dict[S[i]] += 1
    else:
        dict[S[i]] = 1
if(len(dict) == 3):
    print("Three")
else:
    print("Four")

Submission status: Accepted

Solution code:
N=int(input())

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

temp=0

for i in range(N):
    if S[i]=='Y':
        temp=1

if temp==1:
    print('Four')
else:
    print('Three')

Submission status: Accepted

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

yellow=0
for i in range(int(N)):
    if S[i]=='Y':
        yellow+=1
    else:
        continue

if yellow>=1:
    print('Four')
else:
    print('Three')

Submission status: Accepted

Solution code:
ips = []
ips.append(input())
while True:
    try:
        ips.append(input())
    except (EOFError):
        break
num = int(ips[0])
hina = ips[1].split(" ")
v = []
for i in range(num):
    if hina[i] not in v:
        v.append(hina[i])
if len(v) == 3:
    print("Three")
elif len(v) == 4:
    print("Four")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


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

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

Submission status: Accepted

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

Submission status: Accepted

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

s = set(S)
if len(s) == 3 and "Y" not in S:
    print("Three")
else:
    print("Four")

Submission status: Accepted

Solution code:
y = input()
x = input().split(" ")
t = True
for i in x:
    if i == 'Y':
        t = False
        continue

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
l = list(input().split())
found = []

for c in l:
  if not c in found:
    found.append(c)

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

Submission status: Accepted

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

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

c = input()
a = c.split(' ')

for i in a:
    s.add(i)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
items = set(input().split())
results = {3: 'Three', 4: 'Four'}
if len(items) in results:
    print(results[len(items)])

Submission status: Accepted

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

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:
input();print(['Three','Four']['Y'in set(input().split())])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding=utf-8

def solve(n, ss):
    return len(set(ss))

def main():
    n = int(input())
    ss = input().split(' ')
    ans = solve(n, ss)
    if ans == 3:
        print("Three")
    elif ans == 4:
        print("Four")

if __name__ == '__main__':
    main()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:


N = int(input())
x = list(map(str, input().split()))
res=[0,0,0,0]

def check(a):
    if a==[1,1,1,1]:
        print('Four')
        quit()


for i in range(0,N):
    if x[i]=='G':
        res[0]=1
    if x[i]=='Y':
        res[1]=1
    if x[i]=='W':
        res[2]=1
    if x[i]=='P':
        res[3]=1
    check(res)

print('Three')

quit()

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

Submission status: Accepted

Solution code:
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
INF = float("inf")
import sys
sys.setrecursionlimit(10000)


def solve(N, S):
    if "Y" in S:
        return "Four"
    else:
        return "Three"


def main():
    N = int(input())
    S = list(input().split())
    print(solve(N, S))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

c = [i for i in input().split()]

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

Submission status: Accepted

Solution code:
N=input()
colors=input().split()

count={}
for character in colors:
    count.setdefault(character,0)
    count[character]+=1
    
if len(count.keys())==3:
    print('Three')
else:
    print('Four')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    N = int(input() )
    S = [i for i in input().split() ]
#    print(S)
    
    remove_overlap_S = list(set(S) )
#    print(remove_overlap_S)
    
    if(len(remove_overlap_S ) < 4):
        print("Three")
    else:
        print("Four")
    
if __name__=="__main__":
    main()

Submission status: Accepted

Solution code:
import sys

with sys.stdin as f:
    s_input = f.read()

    s_args = s_input.splitlines()
    n = int(s_args[0])
    s = s_args[1].split()

    if len(set(s)) >= 4:
        print("Four")
    else:
        print("Three")
        
sys.exit(0)

Submission status: Accepted

Solution code:
n = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

N = input()
inp = str(input())

I = list(inp)

l = set(I)

s = {'P','W','G','Y'}

if len(l & s) == 0:
    print('Zero')
elif len(l & s) == 1:
    print('One')
elif len(l & s) == 2:
    print('Two')
elif len(l & s) == 3:
    print('Three')
elif len(l & s) == 4:
    print('Four')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
ame=list(map(str,input().split()))
species =0
if 'Y' in ame:
    species += 1
if 'P' in ame:
    species +=1
if 'W' in ame:
    species += 1
if 'G' in ame:
    species += 1
if species ==3:
    print ('Three')
else:
    print('Four')

Submission status: Accepted

Solution code:
#abc089b

n=int(raw_input())
s=map(str,raw_input().split())
ss=set(s)
cnt=len(ss)
if cnt==3:
 print 'Three'
else:
 print 'Four'

Submission status: Accepted

Solution code:
x = int(input())
HINA = input().split()
ThreeOrFour = False
for i in range(x):
    if HINA[i] == "Y":
        ThreeOrFour = True
if ThreeOrFour == True:
    print("Four")
else:
    print("Three")

Submission status: Accepted

Solution code:
n = input()

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 個数の入力
N = 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())

if "Y" in S:
    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().split()
k=[]

for i in S:
    if i =='Y':
        print ("Four")
        k.append("n")
        break
if k == []:
    print("Three")

Submission status: Accepted

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

s_type_len = len(set(s))

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

Submission status: Accepted

Solution code:
n=int(input())
s=input().split()
a=[]
for i in s:
    if i in a:
        continue
    else:
        a.append(i)
c=0
for i in a:
    c+=1
if c==3:
    print("Three")
else:
    print("Four")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
color = set()
for c in input().split():
    color.add(c)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()
str = input().split()
dict = []
for s in str:
    if not s in dict:
        dict.append(s)
print("Three" if len(dict) == 3 else "Four")

Submission status: Accepted

Solution code:
N=input()
array=input().split()
temp=[]
c=0
for i in array:
    if (i in temp):
        continue
    else:
        temp.append(i)
        c+=1
if (c==3):
    print('Three')
elif(c==4):
    print('Four')
else:
    print('Other')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n, l = input(), raw_input().split()
print {3: 'Three', 4: 'Four'}[len(set(l))]

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
if __name__ == "__main__":
    n = int(input())
    s = list(input().split())
    if len(list(set(s))) == 4:
        print("Four")
    else:
        print("Three")

Submission status: Accepted

Solution code:
import math
import numpy as np
from operator import mul

# 整数Nを桁ごとのリストにする
# l = [int(x) for x in list(str(N))]

# リストliから重複を削除したリストli_uniqを作成
#li_uniq = []
#for i in li:
#    if x not in li_uniq:
#        li_uniq.append(x)

# 複数行のinput - list版
#list = [list(map(int, input().split())) for i in range(N)]
# 複数行のinput - dictionary版
# key = a, value = b
#for i in range(N):
#    a, b = map(int, input().split())
#    dict[a] = b


N = int(input())
S = list(input().split())
colors = [0,0]

for i in range(N):
    if S[i] == 'P' or S[i] == 'W' or S[i] == 'G':
        colors[0] += 1
    if S[i] == 'Y':
        colors[1] += 1

if colors[1] == 0:
    print('Three')
else:
    print('Four')

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    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(map(str, input().split()))
c = len(a)
print('Four' if c == 4 else 'Three')

Submission status: Accepted

Solution code:
input_number = int(input())
input_Hina = input().split()
a = 0
if input_Hina.count("G") > 0:
    a += 1
if input_Hina.count("W") > 0:
    a += 1
if input_Hina.count("Y") > 0:
    a += 1
if input_Hina.count("P") > 0:
    a += 1

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

Submission status: Accepted

Solution code:
#coding:utf-8
n = int(input())
c = input().split()
for i in c:
    if i == "Y":
        print("Four")
        break
else:
    print("Three")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = raw_input()
a = [i for i in raw_input().split()]
l = len(list(set(a)))
if l == 3:
  print("Three")
if l == 4:
  print("Four")

Submission status: Accepted

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

Submission status: Accepted

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

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:
ipn = int(input())

flagP = False
flagW = False
flagG = False
flagY = False

st = input().split()

for i in range(ipn):
	if st[i] == "P":
		flagP = True
	if st[i] == "W":
		flagW = True
	if st[i] == "G":
		flagG = True
	if st[i] == "Y":
		flagY = True

if flagP and flagW and flagG and flagY:
	print("Four")
else:
	print("Three")