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-----
6
G W Y P Y W

-----Sample Output-----
Four

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

Difficulty: introductory

Starter code:

Solutions:
import collections 
n = int(input())
li = list(input().split())
c = collections.Counter(li)
if len(c) == 3:
    print('Three')
else:
    print('Four')

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

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

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


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


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

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

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

n = int(input())

S = input().split()

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

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


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

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

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

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

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

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

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

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

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

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

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

color = []

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



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

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

N = int(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')

#!/usr/bin/env python3

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

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



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

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


n = int(input())
s = input().split()

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

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

n = int(input())
hina_arare = map(str, input().split())
if 'Y' in hina_arare:
    print('Four')
else:
    print('Three')

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


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

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

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

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

n = int(input())
s = list(map(str, input().split()))
if s.count('Y') == 0:
    print('Three')
else:
    print('Four')

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

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

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

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

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


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

if (pp + wp + gp + yp) == 3:
    print('Three')
else:
    print('Four')


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


def __starting_point():
    n = int(input())
    pack = list(map(str, input().split()))
    print(decision(pack))
__starting_point()

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

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


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


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


def __starting_point():
    main()
__starting_point()

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

# かぶりを省いたリストを作成し、要素を数えて条件分岐
N = int(input())
S = list(input().split())


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


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


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

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

n=int(input())
s=input().split()
s_set=set(s)

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

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

N=int(input())
S=input().split()
print("Three"if len(set(S))&1else "Four")

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

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


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

# B - Hina Arare

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

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

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

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

print(answer)


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

# B - Hina Arare
# https://atcoder.jp/contests/abc089/tasks/abc089_b

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

result = 'Three'

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

print(result)


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

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

# 黄色'Y'が入っていなければ、Three

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

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

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

def main():
    n=int(input())
    s=input()
    for c in s:
        if c == 'Y':
            print('Four')
            return
    print('Three')
main()


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

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

n = int(input())
s = list(input())

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

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



input()
s = input().split()

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

n = int(input())
s = input().split()

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

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





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

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

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


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

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

if answer == 3:
    print('Three')
if answer == 4:
    print('Four')

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



def __starting_point():
    main()

__starting_point()

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

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

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

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

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

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

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

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

n = int(input())
s = input()

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

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

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

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

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

def main():
    n = int(input())
    s = set(input().split(" "))

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


main()

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

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

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

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

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

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

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

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

color = list(S)
factor = set(color)

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

n = int(input())
l = input().split()
print("Four" if "Y" in l else "Three")

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

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

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

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

# 黄色があるか判定し結果を出力
if colors.count("Y") >0:
    print("Four")
else:
    print("Three")

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

ln=len(set(l))

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

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

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

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

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

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


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

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

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

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

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

#
# abc089 b
#
import sys
from io import StringIO
import unittest
from collections import Counter


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """6
G W Y P Y W"""
        output = """Four"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """9
G W W G P W P G G"""
        output = """Three"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """8
P Y W G Y W Y Y"""
        output = """Four"""
        self.assertIO(input, output)


def resolve():
    N = int(input())
    S = list(input().split())
    C = Counter(S)

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


def __starting_point():
    # unittest.main()
    resolve()

__starting_point()

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

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

else:
    print('Three')

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

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

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

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

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

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

snack_num = int(input())
a = list(map(str, input().split()))
color_set = set(a)

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


n = int(input())
a = [s for s in input().split()]

seta = set(a)
if len(seta) == 4: print('Four')
else: print('Three')


N=int(input())
S=list(input().split())
for c in S:
    if c=='Y':
        print("Four")
        break
else:
    print("Three")


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

n=int(input())
s=input().split()
print("Three" if "Y" not in s else "Four")