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()
print("Four" if "Y" in input() else "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())
a = list(input().split())
if a.count("Y") == 0:
    print("Three")
else:
    print("Four")

Submission status: Accepted

Solution code:
a,o=open(0);print('TFhoruere'['Y'in o::2])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,l=open(0);print('Four'if len(set(l.split()))==4 else'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:
# ABC089 B - Hina Arare
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()
arares=input().split()
d = {'P': 0,
    'Y': 0,
    'W': 0,
    'G': 0}

for arare in arares:
  if arare in d:
    if d[arare]==0:
      d[arare]=1

colors = sum(d.values())
if colors == 3:
  print("Three")
elif colors == 4:
  print("Four")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

dic = {}
for i in range(N):
    if S[i] in dic:
        dic[S[i]]+=1
    else:
        dic[S[i]]=0

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=input()
print(['Three','Four']['Y'in input().split()])

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == "__main__":
    solve()

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())
M = set()
MM = input().split()
for i in MM:
  M.add(i)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input()
a = input().split()
print(["Three", "Four"]["Y" in a])

Submission status: Accepted

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

Submission status: Accepted

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

answer = False

q = input().split()
for i in range(n):
    s = q[i]
    if s == 'Y':
        answer = True
        break

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter
n = int(input())
s = list(input().split())

c = Counter(s)

if len(list(c.keys())) == 3:
    print('Three')
else:
    print('Four')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#import numpy as np
import sys, math
from itertools import permutations, combinations
from collections import defaultdict, Counter, deque
from math import factorial#, gcd
from bisect import bisect_left, bisect_right #bisect_left(list, value)
sys.setrecursionlimit(10**7)
enu = enumerate
MOD = 10**9+7
def input(): return sys.stdin.readline()[:-1]
pl = lambda x: print(*x, sep='\n')

N = int(input())
A = input().split()
ss = len(set(A))
if ss <= 3:
    print('Three')
else:
    print('Four')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def s(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
cnt = 0
ans = 0
inf = float("inf")

n = k()
S = L()
a = list(Counter(S))
if len(a) == 3:
    print("Three")
else:
    print("Four")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

set_S = set(S)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
from math import ceil
def input(): return sys.stdin.readline().strip()


def main():
    n = int(input())
    S = list(input().split())
    yellow = False
    for c in S:
        if c == 'Y':
            yellow = True
            break
    if yellow: print("Four")
    else: print('Three')

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 = list(input().split())
cnt = 0
for c in ("P", "W", "G", "Y"):
    if s.count(c):
        cnt += 1
ans = "Three" if cnt == 3 else "Four"
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

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 = list(input().split())
arare = len(set(s))

if arare == 4:
    print('Four')
else:
    print('Three')

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
n,s=map(str,open(0));print("Four" if "Y" in s else "Three")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = list(map(str,input().split()))
arare = [0,0,0,0]
#PWGY
for i in range(n):
  if s[i] == "P":
    arare[0] = "1"
  elif s[i] == "W":
    arare[1] = "1"
  elif s[i]== "G":
    arare[2] = "1"
  else:
    arare[3] = "1"
    
  if arare.count("1") == 4:
    print("Four")
    exit()
    
print("Three")

Submission status: Accepted

Solution code:
import math
def main():
  n = int(input())
  s = list(map(str,input().split()))
  if 'Y' in s:
    print('Four')
  else:
    print('Three')
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:
import sys
N = int(input())
S = list(input().split())
if not ( 1 <= N <= 100 ):
    sys.exit()
for I in range(len(S)):
    if not (S[I] == 'P' or 'W' or 'G' or 'Y'):
        sys.exit()

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

Submission status: Accepted

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

# check
if len(S) == 3:
    print("Three")
else:
    print("Four")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def actual(N, S):
    number_of_hina_arare_types = len(set(S))

    color_map = {3: 'Three',
                 4: 'Four'}

    return color_map[number_of_hina_arare_types]

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

print(actual(N, S))

Submission status: Accepted

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

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:
a=int(input())
b=list(map(str,input().split()))
n=len(set(b))

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

N = int(input())
S = input()

for s in S:
    if s == 'Y':
        print('Four')
        sys.exit()
print('Three')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=input()
lst=[i for i in input().split()]
if "Y" in lst:
    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:
input()
print('Four' if 'Y' in input() else 'Three')

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
n = int(input())

al = list(input().split())

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

print("Three")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
INF = 10**9
mod = 10**9+7

s = [0]*4
N = i()
S = L()
for i in range(N):
    if S[i] == 'P':
        s[0] = 1
    if S[i] == 'W':
        s[1] = 1
    if S[i] == 'G':
        s[2] = 1
    if S[i] == 'Y':
        s[3] = 1
if sum(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 print('Three')

Submission status: Accepted

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

Submission status: Accepted

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

num = 0
l = []

for i in s:
  if i not in l:
    num += 1
  l.append(i)
if num == 3:
    print('Three')
else:
    print('Four')

Submission status: Accepted

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

b=1
for i in s:
    if i=='Y':
       b=0

if b==0:
    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:
import sys
input = sys.stdin.readline

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

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

Submission status: Accepted

Solution code:
import sys

def solve():
    input = sys.stdin.readline
    N = int(input())
    S = map(str, input().strip("\n"))
    if "Y" in S: print("Four")
    else: print("Three")

    return 0

if __name__ == "__main__":
    solve()

Submission status: Accepted

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

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=list(input().split())
for s in S:
  if s=='Y':
    print('Four')
    exit(0)
print('Three')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
s=list(input().split())
color=[0]*4
for i in s:
    if i=="P":
        color[0]+=1
    elif i=="W":
        color[1]+=1
    elif i=="G":
        color[2]+=1
    else:
        color[3]+=1
print("Four" if color.count(0)==0 else "Three")

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:
n=int(input())
lis=list(input().split())
ans=0
for i in range(n):
  if lis[i] == "Y":
    ans=1
print(["Three","Four"][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 = input()
color_list = [i for i in input().split()]
print('Four') if 'Y' in color_list else print('Three')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter
N = input()
color_list = [i for i in input().split()]
result = len(Counter(color_list))

if result == 3:
    result = 'Three'
elif result == 4:
    result = 'Four'

print(result)

Submission status: Accepted

Solution code:
def mi():
    return map(int, input().split())

def ii():
    return int(input())

def main():
    N = ii()
    S = set(input().split())
    if len(S) == 3:
        print('Three')
    else:
        print('Four')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


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

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

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

S = list(set(S))

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

print(ans)

Submission status: Accepted

Solution code:
N = int(input())
arare = input().split()
y = 0
for i in range(len(arare)):
  if arare[i] == "Y":
    y += 1
    break
if y == 1:
  print("Four")
else:
  print("Three")

Submission status: Accepted

Solution code:
n = int(input())
s = list(map(str,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()

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=input();print(['Three','Four']['Y'in input().split()])

Submission status: Accepted

Solution code:
_=int(input());print(['Three','Four']['Y'in input().split()])

Submission status: Accepted

Solution code:
N=int(input());print(['Three','Four']['Y'in input().split()])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
S = [True if i=='Y' else False for i in input().split()]
print('Four' if any(S) else '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:
n = int(input())
apple = list(map(str, input().split()))
print("Four" if "Y" in apple else "Three")

Submission status: Accepted

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

L = []
for i in range(len(S)):
  if S[i] not in L:
    L.append(S[i])
if len(L) == 3:
  print("Three")
else:
  print("Four")

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
_=input();s=input().split();print("TFhoruere"["Y"in s::2])

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def ABC_89_B():
    N=int(input())
    s = input().split()
    l = ['P','W','G','Y']
    c=0
    for i in range(len(l)):
        if s.count(l[i])>=1:
            c+=1

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

if __name__ == '__main__':

    ABC_89_B()

Submission status: Accepted

Solution code:
colors = {}
n = int(input())
s = [i for i in input().split()]
for color in s:
    colors[color] = 1
if len(colors) == 3:
    print('Three')
else:
    print('Four')

Submission status: Accepted

Solution code:
import collections
def solve(n, s_list):

    counter = collections.Counter()
    for s in s_list:
        counter[s[0]] += 1


    if len(counter.keys()) == 4:
        return "Four"
    else:
        return "Three"


if __name__ == "__main__":
    n = int(input())
    s_list = [i for i in input().split()]
    print(solve(n, s_list))

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

Sn = input().split()

for c in Sn:
    if c == 'Y':
        num = 1
        break
    num = 0

if num == 1:
    result = 'Four'
else:
    result = 'Three'

print(result)

Submission status: Accepted

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

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

Submission status: Accepted

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

import sys
# import time
# import math
# import numpy as np
# import scipy.sparse.csgraph as cs            # csgraph_from_dense(ndarray, null_value=inf), bellman_ford(G, return_predecessors=True), dijkstra, floyd_warshall
# import random                                # random, uniform, randint, randrange, shuffle, sample
# import string                                # ascii_lowercase, ascii_uppercase, ascii_letters, digits, hexdigits
# import re                                    # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)
# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).
# from collections import deque                # deque class. deque(L): dq.append(x), dq.appendleft(x), dq.pop(), dq.popleft(), dq.rotate()
# from collections import defaultdict          # subclass of dict. defaultdict(facroty)
# from collections import Counter              # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)
# from datetime import date, datetime          # date.today(), date(year,month,day) => date obj; datetime.now(), datetime(year,month,day,hour,second,microsecond) => datetime obj; subtraction => timedelta obj
# from datetime.datetime import strptime       # strptime('2019/01/01 10:05:20', '%Y/%m/%d/ %H:%M:%S') returns datetime obj
# from datetime import timedelta               # td.days, td.seconds, td.microseconds, td.total_seconds(). abs function is also available.
# from copy import copy, deepcopy              # use deepcopy to copy multi-dimentional matrix without reference
# from functools import reduce                 # reduce(f, iter[, init])
# from functools import lru_cache              # @lrucache ...arguments of functions should be able to be keys of dict (e.g. list is not allowed)
# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).
# from heapq import nlargest, nsmallest        # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).
# from itertools import count, cycle, repeat   # count(start[,step]), cycle(iter), repeat(elm[,n])
# from itertools import groupby                # [(k, list(g)) for k, g in groupby('000112')] returns [('0',['0','0','0']), ('1',['1','1']), ('2',['2'])]
# from itertools import starmap                # starmap(pow, [[2,5], [3,2]]) returns [32, 9]
# from itertools import product, permutations  # product(iter, repeat=n), permutations(iter[,r])
# from itertools import combinations, combinations_with_replacement
# from itertools import accumulate             # accumulate(iter[, f])
# from operator import itemgetter              # itemgetter(1), itemgetter('key')
# from fractions import gcd                    # for Python 3.4 (previous contest @AtCoder)



def main():
    mod = 1000000007                # 10^9+7
    inf = float('inf')              # sys.float_info.max = 1.79...e+308
    # inf = 2 ** 64 - 1             # (for fast JIT compile in PyPy) 1.84...e+19
    sys.setrecursionlimit(10**6)    # 1000 -> 1000000
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    n = ii()
    L = input().split()
    print('Four') if 'Y' in L else print('Three')


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = 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()))

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