Problem:


Score : 200 points

Problem Statement

In Japan, people make offerings called hina arare, colorful crackers, on March 3.

We have a bag that contains N hina arare. (From here, we call them arare.)

It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow.

We have taken out the arare in the bag one by one, and the color of the i-th arare was S_i, where colors are represented as follows - pink: P, white: W, green: G, yellow: Y.

If the number of colors of the arare in the bag was three, print Three; if the number of colors was four, print Four.

Constraints

1 \leq N \leq 100

S_i is P, W, G or Y.

There always exist i, j and k such that S_i=P, S_j=W and S_k=G.

Input

Input is given from Standard Input in the following format:

N
S_1 S_2 ... S_N

Output

If the number of colors of the arare in the bag was three, print Three; if the number of colors was four, print Four.

Sample Input 1

6
G W Y P Y W

Sample Output 1

Four

The bag contained arare in four colors, so you should print Four.

Sample Input 2

9
G W W G P W P G G

Sample Output 2

Three

The bag contained arare in three colors, so you should print Three.

Sample Input 3

8
P Y W G Y W Y Y

Sample Output 3

Four



Sample input:
6
G W Y P Y W


Sample output:
Four

Submission status: Accepted

Solution code:
#インポート
import sys

#入力用
def ILI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def ISI(): return map(int, sys.stdin.readline().rstrip().split())
def II(): return int(sys.stdin.readline().rstrip())
def ISS(): return sys.stdin.readline().rstrip().split()
def IS(): return sys.stdin.readline().rstrip()

N = II()
S = ISS()
if len(set(S)) == 3:
    print("Three")
else:
    print("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:
_,a = input(),input().split()
color =  ['P','W','G','Y']
print("Three" if sum([int(color[i] in a) for i in range(4)]) == 3 else "Four")

Submission status: Accepted

Solution code:
from collections import deque
import sys
sys.setrecursionlimit(10**7)

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

Submission status: Accepted

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

for s in S:
    if not s in v:
        v.append(s);

if len(v) == 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
import math
from fractions import gcd
# import queue
# from collections import Counter
# from itertools import accumulate
# from functools import reduce

def lcm(a, b):
    return a * b // gcd(a, b)

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

big_prime = 1000000007

"""
# 標準入力取得
## 文字列
 =  sys.stdin.readline().rstrip()
 =  list(sys.stdin.readline().rstrip())

## 数値
 =  int(sys.stdin.readline())
 =  map(int, sys.stdin.readline().split())
 =  list(map(int, sys.stdin.readline().split()))
 =  [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""


N =  int(sys.stdin.readline())
S =  list(sys.stdin.readline().rstrip())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = set(input().split())
print('Three' if len(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,S=open(0);print("TFhoruere"["Y"in S.split()::2])

Submission status: Accepted

Solution code:
print("TFhoruere"["Y"in open(0).read().split()::2])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from statistics import *
from collections import *
from operator import itemgetter
stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

n = ni()
sss = input()
c = Counter(sss)
print('Three' if len(c.keys()) - 1 == 3 else '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=input().split()
if not s.count("P")==0 and not s.count("W")==0 and not s.count("G")==0 and not s.count("Y")==0:
    print("Four")
else:
    print("Three")

Submission status: Accepted

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

ans = "Three"

for item in S:
  if item == "Y":
    ans = "Four"

print(ans)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
input()
print('Four' if 'Y' in input().split() 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:
def resolve():
    n = int(input())
    print("Four" if "Y" in input().split() else "Three")


if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n =int(input())
s = list(set(input().split()))
if len(s) == 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 = 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 = input().split()

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

print("Three")

Submission status: Accepted

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

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

print('Three')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    input()
    S = "".join(input().split())
    return "Four" if "Y" in S else "Three"


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

Submission status: Accepted

Solution code:
dic = {}
input()
N = input().split()
for i in N:
    if i not in dic:
        dic[i] = 0
print("Three") if len(list(dic.keys())) == 3 else print("Four")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from collections import Counter

N = int(input())
S = list(map(str,input().split()))
counter = Counter(S)
s = len(counter)
if s == 3:
    print("Three")
else:
    print("Four")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n,*s=open(0).read().split()
print('Four' if 'Y' in s else 'Three')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=int(input())
y=input().split()
x=[]
for i in range(n):
    if y[i] not in x:
        x.append(y[i])
    #計算量を減らす
    if len(x)==4:
        break

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

Submission status: Accepted

Solution code:
_=input()
print('TFhoruere'[len(set(input().split()))-3::2])

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
 
Tmp = []
Tmp = input().rstrip().split(' ')
 
nAns = [ 0 for i in range(4)]
Flag = 0
for i in range(N):
  S = Tmp[i]
  if S=='Y':
    Flag = 1

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

arare = []
for s in S:
    arare.append(s)

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    N = int(input())

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

    set_S = set(S)

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


main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter

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

B = Counter(A)
a = len(B)
if a == 4:
    print('Four')
else:
    print('Three')

Submission status: Accepted

Solution code:
n = int(input())
a = list(input().split())
for i in a:
  if i == 'Y':
    print('Four')
    exit()
  else:
    pass
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(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 = 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()))
d = {}
for i in s:
    if i not in d:
        d[i] = 1
print("Three" if len(d) == 3 else "Four")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
S = list(map(str,input().split()))
print('Three') if S.count('Y') ==0 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:


def main():

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

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







    
if __name__== "__main__":
    main()

Submission status: Accepted

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

S.sort()

S_tmp = S[0]
count = 1

for i in range(N):
    if S_tmp != S[i]:
        count += 1
        S_tmp = S[i]

if count == 3 :
    print("Three")

else:
    print("Four")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter

n = int(input())
s = list(input().split())
count_s = Counter(s)
if len(count_s) == 3:
    print("Three")
else:
    print("Four")

Submission status: Accepted

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

c = 0
g = 0
w = 0
y = 0
p = 0
for s in S:
  if s == 'G':
    if g == 0:
      g = 1
      c += 1
  elif s == 'W':
    if w == 0:
      w = 1
      c += 1
  elif s == 'Y':
    if y == 0:
      y = 1
      c += 1
  else:
    if p == 0:
      p = 1
      c += 1

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

Submission status: Accepted

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

#print(n,S)
for i in S:
  if i=='Y':
    ans = ('Four')
    break
  else:
    ans =('Three')
    
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
s=list(map(str,input().split()))
total=[]
for i in range(n):
    if s[i] not in total:
        total.append(s[i])
print('Three' if len(total)==3 else 'Four')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
b = list(input().split())
count = b.count('Y')
if count == 0:
    print('Three')
else:
    print('Four')

Submission status: Accepted

Solution code:
 # ABC 89, B - hina arare
n = int(input())
S = input().split(' ')

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = input()
from collections import Counter
c = Counter(s)
if 'Y' in c:
    print('Four')
else:
    print('Three')

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
n = int(input())
l = list(map(str, input().split()))
if len(set(l)) == 3:
    print('Three')
else:
    print('Four')

Submission status: Accepted

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

Submission status: Accepted

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

yCnt = Slist.count('Y')

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

Submission status: Accepted

Solution code:
import math

n = int(input())
#a = int(input())
#a,b = list(map(int,input().split(" ")))
ls = list(input().split(" "))
#ls = list(map(int,input().split(" ")))
#a,b = list(input().split())
#string = input()
#ls = [int(input()) for i in range(n)]
#ls1 = [input() for i in range(n)]
#m = int(input())
#ls2 = [input() for i in range(m)]
if ls.count("Y") > 0:
  print("Four")
else:
  print("Three")

Submission status: Accepted

Solution code:
i=open(0).read().split()[1:]
print(["Three","Four"]["Y" in i])

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
arares = list(input().split())
four = False
for arare in arares:
  if arare == 'Y':
    four = True
    break
if four:
  print('Four')
else:
  print('Three')

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
b = list(map(str, input().split()))
c = {}
for i in b:
    c[i] = 1
print("Three" if len(c) == 3 else "Four")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#A
def A():
    n = II()
    print(n//3)
    return

#B
def B():
    n = II()
    s = S()
    print(["Three", "Four"][len(set(s)) - 4])
    return

#C
def C():
    return

#D
def D():
    return

#Solve
if __name__ == '__main__':
    B()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import math

# NO, PAY-PAY
#import numpy as np
#import statistics
#from statistics import mean, median,variance,stdev
 
def main():
    N = int(input())
    s = input().split()
    
    for i in s:
        if i == "Y":
            print("Four")
            sys.exit()
            
    print("Three")
	
if __name__ == "__main__":
	main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
# def LIST(): return list(map(int, input().split()))
def LIST(): return list(map(str, input().split()))
# def LIST(): return list(input())

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
S = LIST()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

input()
# スペース区切りの整数の入力
print("Four" if len(set(input().split())) == 4 else "Three" )

Submission status: Accepted

Solution code:
a = int(input())
b = {}
c = list(input().split())
for i in range(a):
    b[c[i]] = 1
print("Three" if len(b) == 3 else "Four")

Submission status: Accepted

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

Submission status: Accepted

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

    kind_set = set()
    for s in S:
        kind_set.add(s)

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
r=int(input())
a=[j for j in input().split()]
b=0
for i in a:
  if i=="Y":
    b=1
    break;

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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(input().split())
ans = 'Three'
if s.count('Y') > 0:
    ans = 'Four'
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
l=list(input().split())
if l.count("P")==0 or l.count("W")==0 or l.count("G")==0 or l.count("Y")==0:
    print("Three")
else:
    print("Four")

Submission status: Accepted

Solution code:
from collections import Counter
n = int(input())
a = list(input().split(" "))
ans = 'Y' in Counter(a).keys()
print("Four" if ans else "Three")

Submission status: Accepted

Solution code:
n=int(input())
da=list(map(str,input().split()))
while n>0:
    n-=1
    if da[n]=='Y':
        print('Four')
        break
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:
N = int(input())
S = set(input().split())
print("Three" if S == {"P", "W", "G"} else "Four")

Submission status: Accepted

Solution code:
N = int(input())
A = input().split()
lst = []
for i in range(0, N):
	if A[i] not in lst:
		lst.append(A[i])
if len(lst) == 3:
	print('Three')
else:
	print('Four')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
s={i for i in input().split()}
if s=={"G","W","P","Y"}:print("Four")
else:print("Three")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

s = input().split()

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

Submission status: Accepted

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