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:
a=int(input())
#print(a)
b=[i for i in input().split()]
#print(b)
c=len(set(b))
#print(c)
if c==4:
	print("Four")
else:
	print("Three")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
l = input().rstrip().split()
d = {}
for c in l:
    d[c] = True

if d.get('Y', False):
    print('Four')
else:
    print('Three')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = list(input().split())
str = "PWGY"
for i in range(n):
    if s[i] in str:
        str = str.replace(s[i],"")
        if len(str)==0:
            break
if len(str)==0:
    print("Four")
else:
    print("Three")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = input().split(" ")
s = sorted(s)
list = [0] * 26
for i in range(n):
    list[ord(s[i])-97] += 1
ans = []
for i in range(len(list)):
    if list[i] != 0:
        ans.append(list[i])
if len(ans) == 3:
    print("Three")
elif len(ans) == 4:
    print("Four")

Submission status: Accepted

Solution code:
# coding: utf-8
import sys
input = sys.stdin.readline

_ = input()
s = input()
print("Four" if "Y" in s else "Three")

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
import sys
input = sys.stdin.readline

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

Submission status: Accepted

Solution code:
n=int(input());print("TFhoruere"[len(set(list(input().split())))==4::2])

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

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 == 1:
    print("Four")
else:
    print("Three")

Submission status: Accepted

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


def main():
    """Function."""
    n = int(input())
    s = list(map(str, input().split()))

    check = set()
    for i in range(n):
        check.add(s[i])

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

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

Submission status: Accepted

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

Submission status: Accepted

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

S=set(S)

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

Submission status: Accepted

Solution code:
N = int(input())
arare = [s for s in input().split()]
if (arare.count("Y") > 0) :
    print("Four")
else :
    print("Three")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Hina Arare
input()
s = list(input().split())
for i in s:
    if i == 'Y':
        exit(print('Four'))
print('Three')

Submission status: Accepted

Solution code:
import re
n = int(input())
if re.search('Y', input()):
  print('Four')
else:
  print('Three')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()
l = list(map(str, input().split()))
if l.count('Y') > 0:
  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())
arare_list = list(input().split())
count = 0

for i in arare_list:
    if i == 'Y':
        count = 1

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
S = list(input().split())
c = "Three"
for i in range(n):
	if S[i] == "Y":
		c = "Four"

print(c)

Submission status: Accepted

Solution code:
N = input()
a = list(input().split())
Y = 0
for i in a:
    if i == "Y":
        Y += 1
if Y >= 1:
    print("Four")
else:
    print("Three")

Submission status: Accepted

Solution code:
n = int(input())
S = list(input().split())
ans = "Three"
for i in range(n):
  if S[i] == "Y":
    ans = "Four"
print(ans)

Submission status: Accepted

Solution code:
N = input()
S = raw_input().split()
if len(set(S)) == 4:
	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:
input()
if 'Y' in input():
    print('Four')
else:
    print('Three')

Submission status: Accepted

Solution code:
N = int(input())
grains = input().split(" ")
is_y_in = False

for arare in grains:
    if arare == "Y":
        is_y_in = True

print("Four" if is_y_in else "Three")

Submission status: Accepted

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

    return "Three" if len(set(s)) == 3 else "Four" if len(set(s)) == 4 else "ERROR"


if __name__ == '__main__':
    print(abc089_b())

Submission status: Accepted

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

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


if __name__ == '__main__':
    print(abc089_b())

Submission status: Accepted

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

b = collections.Counter(a)

if len(b.values())==3:
    print("Three")
elif len(b.values())==4:
    print("Four")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
a = input().split()
a = [str(m) for m in a]

for i in a:
    if i == "Y":
        print("Four")
        exit()

print("Three")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())
a = 0
lst = list(input().split(' '))
sst = []
for i in range(x):
    if lst[i] not in sst:
        sst.append(lst[i])
        a+=1
print("Three" if a == 3 else "Four")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin


def main() -> None:
    n = int(input())
    dic = set()

    for i in range(n):
        s = next_str()
        dic.add(s)

    print(["Three", "Four"][len(dic) == 4])


def next_str() -> str:
    result = ""
    while True:
        tmp = stdin.read(1)
        if tmp.strip() != "":
            result += tmp
        elif tmp != '\r':
            break
    return result


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from sys import stdin


def main() -> None:
    n = int(input())
    dic = set()

    for i in range(n):
        s = next_str()
        dic.add(s)

    print(["Three", "Four"][int(len(dic) == 4)])


def next_str() -> str:
    result = ""
    while True:
        tmp = stdin.read(1)
        if tmp.strip() != "":
            result += tmp
        elif tmp != '\r':
            break
    return result


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n=int(input())
L=list(input().split())
res="Three"

for i in range(n):
    if L[i]=="Y":
        res="Four"
        break

print(res)

Submission status: Accepted

Solution code:
N = int(input())
S = list(map(str,input().split()))
S = list(set(S))
p = S.count("P")
w = S.count("W")
g = S.count("G")
y = S.count("Y")
ans = p+w+g+y
if ans == 3 :
    print("Three")
else :
    print("Four")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin
 
sys.setrecursionlimit(10**5) 
 
def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

n = ni()
w = ns()
y = w.count("Y")

if y:
    print("Four")
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:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
input()
s = set(input().split())
if len(s)==3:
  print("Three")
else:
  print("Four")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
S = {s for s in input().split() }
print("Three" if len(S) == 3 else "Four")

Submission status: Accepted

Solution code:
#!/usr/bin/env python
import collections
N = int(input())
S = input().split()
c = collections.Counter(S)
if c['Y']>0:
    print('Four')
else:
    print('Three')

Submission status: Accepted

Solution code:
## ABC 089
n = int(input())
nl = [ _ for _ in input().split()]

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

Submission status: Accepted

Solution code:
N = int(input())
S_list = list(map(str, input().split( )))
import collections
S_dict = collections.Counter(S_list)
S_val, S_count=zip(*S_dict.most_common())
ans_number = len(S_val)
ans = 'Three'
if ans_number == 4:
  ans = 'Four'
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print({3: "Three", 4: "Four"}[len(set(s))])

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input()
sl = [i for i in input().split()]
print(["Three", "Four"][len(set(sl)) == 4])

Submission status: Accepted

Solution code:
n = int(input())
sl = [i for i in input().split()]
print(["Three", "Four"][len(set(sl)) == 4])

Submission status: Accepted

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

a = 'Three'
for _ in(s):
    if _ == 'Y':
        a = 'Four'
print(a)

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())
for i in range(n):
  if a[i] == "Y":
    print("Four")
    exit()
    
print("Three")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())

ans='Three'
for x in input().split():
    if x == 'Y':
        ans='Four'
        break
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

dic = {}
for s in S:
    dic[s] = 1
if len(dic) == 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 = input().split()
if len(set(s)) == 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().split()

for si in s:
  if si == "Y":
    print("Four")
    break
else:
  print("Three")

Submission status: Accepted

Solution code:
N = int(input())
L = list(map(str,input().split()))
flag = 4
if "P" in L :
    flag -= 1
if "W" in L :
    flag -= 1
if "G" in L :
    flag -= 1
if "Y" in L :
    flag -= 1
if flag == 0 :
    print("Four")
else :
    print("Three")

Submission status: Accepted

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

index=0
flagY =0
while index<n:
    if listS[index] == "Y":
        flagY =1
        break
    else:
        index+=1

if flagY ==1:
    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())
A = list(input().split())
L = set(A)
if (len(L) == 3):
  print('Three')
else:
  print('Four')

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
anslist = ['Three', 'Four']
N = int(raw_input())
S = raw_input().split()
ans = 0
if 'Y' in S: ans = 1
print anslist[ans]

Submission status: Accepted

Solution code:
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, input().split()))
def inpl_s(): return list(input().split())

N = int(input())
S = inpl_s()
hoge = set()
for s in S:
	hoge.add(s)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
s_list =  "".join(input().split())

s_list = s_list.replace("G", "").replace("P", "").replace("W", "")
if len(s_list) == 0 :
    print("Three")
else:
    print("Four")

Submission status: Accepted

Solution code:
#89b
n=int(input())
a=list(set(input()))
print('Three' if len(a)==4 else 'Four')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
S = []
hantei = False

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

A = input()

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

Submission status: Accepted

Solution code:
#!/usr/bin/python3

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
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
l=set([i for i in input().split()])
print(["Three","Four"][len(l)==4])

Submission status: Accepted

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

colour = []
for i in range(N):
    if s[i] not in colour:
        colour.append(s[i])
        
if len(colour) == 3:
    print("Three")
elif len(colour) == 4:
    print("Four")

Submission status: Accepted

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

res = "Three"
for c in s:
    if c == 'Y':
        res = "Four"
        break
print(res)

Submission status: Accepted

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

Submission status: Accepted

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

a = ("Four" if "Y" in li else "Three")
print(a)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

COUNT = S.count("Y")

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
S=list(map(str,input().split()))
bucket=[0*i for i in range(4)]
for i in range(N):
    if S[i]=='P':
        bucket[0]+=1
    elif S[i]=='W':
        bucket[1]+=1
    elif S[i]=='G':
        bucket[2]+=1
    else:
        bucket[3]+=1
if 4 - bucket.count(0)==3:
    print('Three')
else:
    print('Four')

Submission status: Accepted

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

def main():
    n = int(input())

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N=int(input())
s=set(input())
print("Four" if len(s)==5 else "Three")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
if len(set(input().rstrip().split())) ==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(raw_input())
print "Three" if len(set(raw_input().split())) == 3 else "Four"

Submission status: Accepted

Solution code:
# cook your dish here
# cook your dish here
n=int(input())
list = input().split()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
flag = 0
N = int(input())
c = input().split()
for i in range(0,N):
  if c[i] == 'Y':
    flag = 1
if flag:
  print('Four')
else:
  print('Three')

Submission status: Accepted

Solution code:
"""
https://abc089.contest.atcoder.jp/tasks/abc089_b
"""
n=int(input())
s=[i for i in input().split()]
a=1
for i in s:
    if i=="Y":
        a=a*0
    else:
        a=a*1

if a==0:
    print("Four")
else:
    print("Three")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
S = set(input())
S.remove(' ')
if len(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:
N = int(input())
a = set(input().split())
if len(a) == 4:
    print("Four")
elif len(a) == 3:
    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())
type = len(set([ i for i in input().split()]))
print(["Three","Four"][type>=4])

Submission status: Accepted

Solution code:
n=int(input())
line=input().split(" ")
colors=[0,0,0,0]
s=0
for i in range(n):
	if line[i]=="G":
		colors[0]=1
	if line[i]=="W":
		colors[1]=1
	if line[i]=="P":
		colors[2]=1
	if line[i]=="Y":
		colors[3]=1
s=sum(colors)
if s==3:
	print ("Three")
else:
	print("Four")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x=int(input())
y=[str(x) for x in str(input()).split()]
count=0
for i in y:
  if i=="Y":
    count=1

if count==1:
  print("Four")
else:
  print("Three")

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(str,input().split()))
if 'Y' in A:
  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())
arare = set(input().split())
if len(arare) == 3:
    print('Three')
else:
    print('Four')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n =int(input())
s = input().split()
cnt=[0,0,0,0]
for i in range(n):
    if s[i]=='G':cnt[0]+=1
    elif s[i]=='W':cnt[1]+=1
    elif s[i]=='Y':cnt[2]+=1
    else: cnt[3]+=1
print("Three" if min(cnt)==0 else "Four")

Submission status: Accepted

Solution code:
N=int(raw_input())
S=raw_input().split()
from collections import Counter
st = Counter(S)
if len(st) == 4:
  print 'Four'
else:
  print 'Three'

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Wed Jun 13 17:57:26 2018


文字列に[Y]が入っていたら[Four]を出力
そうではなければ [Three]を出力


入力
6
G W Y P Y W

出力
Four


@author: Yuya
"""

N = int(input())

#整数(複数)入力
S = input().split()

flag = 0

for i in range(N):
    if S[i] == "Y":
        flag = 1
    
if flag == 1:
    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 = list(map(str, input().split()))
result =  'Three'

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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