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:
n=int(input())
A=list(input().split())
for i in range(n):
    if A[i]=="Y":
        print("Four")
        break
else:
    print("Three")

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    str_list = list(input().split())

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

def resolve():
    N = int(input())
    S = input().split(" ")
    print("Four" if "Y" in S else "Three")

if '__main__' == __name__:
    resolve()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# Python3 (3.4.3)
import sys
input = sys.stdin.readline

# -------------------------------------------------------------
# function
# -------------------------------------------------------------


# -------------------------------------------------------------
# main
# -------------------------------------------------------------
N = int(input())
S = input().rstrip()

# "Y"が入っていれば4色
print("Four" if S.count("Y") > 0 else "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 = list(input().split())

s = set(S)

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

Submission status: Accepted

Solution code:
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:
count_p=0
count_w=0
count_g=0
count_y=0


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

for i in range(N*2):
    #奇数の場合のみ抽出
    if i%2==0:
        #色分け
        if S[i]=='P' and count_p==0:
            count_p+=1
        if S[i]=='W' and count_w==0:
            count_w+=1
        if S[i]=='G' and count_g==0:
            count_g+=1
        if S[i]=='Y' and count_y==0:
            count_y+=1

if count_p+count_w+count_g+count_y==3:
    print('Three')
else:
    print('Four')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
url = "https://atcoder.jp/contests/abc089/tasks/abc089_b"

def main():
    s = input()
    ame = list(input().split())
    ame = set(ame)
    ans = 'Four'
    if len(ame) == 3:
        ans = 'Three'
    print(ans)

if __name__ == '__main__':
    main()

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print("TFhoruere"[len(set(open(0).read().split()))-4::2])

Submission status: Accepted

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

s2 = set(s)

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

Submission status: Accepted

Solution code:
import sys

N=int(input())
s=list(input().split())
for i in range(0, len(s)):
  if(s[i]=='Y'):
    print("Four")
    sys.exit(0)
print("Three")

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
from collections import defaultdict

cnt = defaultdict(int)

n = int(input())
s = list(input().split())
for i in range(n):
    cnt[s[i]] += 1

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

Submission status: Accepted

Solution code:
n = int(input())
list_S = list(map(str, input().split()))
k = len(list(set(list_S)))
if k == 3:
    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:
n = input()
print("Three" if len(set(str(x) for x in input().split())) == 3 else "Four")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = input().split()
for a in A:
  if a == 'Y':
    print('Four')
    exit()
print('Three')

Submission status: Accepted

Solution code:
n=int(input())
A=sorted(list(input().split()))
if A[-1]=="Y":
  print("Four")
else:
  print("Three")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

n = ii()
S = isl()

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

Submission status: Accepted

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

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 = input().split()
ans = 'Three'
for i in range(n):
    if s[i] == 'Y':
        ans = 'Four'
        break
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

s.sort()
cnt = 1
for i in range(n-1):
    if(s[i] != s[i+1]):
        cnt+=1

if(cnt==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:

import math
import itertools
import statistics
#import numpy as np
import collections
n = int(input())
s = list(input().split())
if "G"in s and "W" in s and "P" in s and "Y" in s:
    print("Four")
else:
    print("Three")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=int(input())
s = 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())
S = list(map(str, input().split()))
D = {}
L = ["zero", "one", "two", "Three", "Four"]
for i in S:
  if i in D:
    D[i] += 1
  else:
    D[i] = 1
print(L[len(D)])

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 = int(input())
L = list(map(str, input().split()))
b = 'Three'
for i in range(a):
  if L[i] == 'Y':
    b = 'Four'
    break
print(b)

Submission status: Accepted

Solution code:
import math

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

se=set()

for i in range(n):
    se.add(s[i])


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import os

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

ans = 'Four' if S.count('Y') else 'Three'

print(ans)

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    ss = list(input().split())

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

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.readline

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

Submission status: Accepted

Solution code:
n = int(input())
sl = list(input().split())
sl_s = set(sl)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

n=input()
ss=input().split()
for s in ss:
  if s=="Y":
    print("Four")
    sys.exit()
    
print("Three")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import string


def readints():
    return list(map(int, input().split()))


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


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


# coordinates
dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]

n = int(input())
s = list(map(str, input().split()))
# print(s)
# print(set(s))
if len(set(s)) == 3:
    print("Three")
if len(set(s)) == 4:
    print("Four")

Submission status: Accepted

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

ans=("G" in s) and ("Y" in s) and ("W"in s) and ("P" in s)
print("Four"if ans==True else"Three")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
l = list(input().split())
#print(l)
a ="Three"
for i in l:
  if i =="Y":
    a="Four"
    break
print(a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
S=input().split()
ss=[a for a in S]
list=[]
for b in ss:
    if b in list:
        pass
    else:
        list.append(b)
if len(list)==3:
    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())
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=input().split()
print('Four' if 'Y' in s else 'Three')

Submission status: Accepted

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

PWGY = [0] * 4
for i in range(N):
  if S[i] == "P" and PWGY[0] == 0:
    PWGY[0] = 1
  elif S[i] == "W" and PWGY[1] == 0:
    PWGY[1] = 1
  elif S[i] == "G" and PWGY[2] == 0:
    PWGY[2] = 1
  elif S[i] == "Y" and PWGY[3] == 0:
    PWGY[3] = 1

print("Four" if sum(PWGY) == 4 else "Three")

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:
# 2020/01/19
# AtCoder Beginner Contest 089 - B

# Input
n = int(input())
s = list(input().split())

# Init Dictionary
chardict = dict(P = 0, W = 0, G = 0, Y = 0)

# Calc
for i in range(n):
    chardict[s[i]] = chardict[s[i]] + 1

zcnt = 0
for k in chardict.keys():
    if chardict[k] == 0:
        zcnt = zcnt + 1

ans = ""
if zcnt == 0:
    ans = 'Four'
elif zcnt == 1:
    ans = 'Three'

# Output
print(ans)

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    A = {i for i in input().split()}
    if "Y" in A:
        print("Four")
    else:
        print("Three")


if __name__ == '__main__':
    main()

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

Submission status: Accepted

Solution code:
n=int(input())
s=list(map(str,input().split()))
color=set()
for ss in s:
    color.add(ss)
if len(color)==3:
    print('Three')
elif len(color)==4:
    print('Four')

Submission status: Accepted

Solution code:
N = int(input())
S = input().split()
 
S.sort()
 
if S[-1] == "Y":
  print("Four")
else:
  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())
s = list(map(str, input().split()))
if len(set(s)) == 4:
    print('Four')
else:
    print('Three')

Submission status: Accepted

Solution code:
from collections import Counter
N = input()
s = input().split()
c = Counter(s)
if len(c) == 4:
    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()
print('Three')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
a = [str(i) for i in input().split()]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, re, os
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 STR(): return input()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7

n = INT()
s = S_LIST()
if len(set(s)) == 4:
    print('Four')
else:
    print('Three')

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def Hina_Arare(n , sl):

    ans = ""

    count = len(set(sl))

    if count == 3:
        ans = "Three"
    else:
        ans = "Four"

    return ans

def main():
    n = int(input())
    sl = list(map(str , input().split()))
    print(Hina_Arare(n , sl))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#pypyは内包表記使わない
def main():
    import sys
    #input = sys.stdin.readline
    sys.setrecursionlimit(10000000)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations
    #from itertools import accumulate, product
    from bisect import bisect_left,bisect_right
    from math import floor, ceil
    #from operator import itemgetter

    #mod = 1000000007

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

if __name__ == '__main__':
    main()

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

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

Submission status: Accepted

Solution code:
# Author: cr4zjh0bp
# Created: Thu Mar 12 19:40:42 UTC 2020
import sys
 
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni = lambda: int(ns())
nin = lambda y: [ni() for _ in range(y)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda y: [na() for _ in range(y)]
nf = lambda: float(ns())
nfn = lambda y: [nf() for _ in range(y)]
nfa = lambda: list(map(float, stdin.readline().split()))
nfan = lambda y: [nfa() for _ in range(y)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda y: [ns() for _ in range(y)]
ncl = lambda y: [list(ns()) for _ in range(y)]
nas = lambda: stdin.readline().split()

N = ni()
S = nas()
c = dict()
for i in range(N):
    c[S[i]] = 1

print("Three" if len(c.items()) == 3 else "Four")

Submission status: Accepted

Solution code:
N = int(input())
S = list(map(str, input().split()))
flag = False
for i in S:
    if i == 'Y':
        flag = True
print('Four' if flag else 'Three')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
n = int(input())
cl = input().split()
for c in cl:
  if c=='Y':
    print('Four')
    sys.exit()
else:
  print('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:
N=int(input())
S=set(list(map(str, input().split())))
print('Four' if len(S)==4 else 'Three')

Submission status: Accepted

Solution code:
N = int(input())
hina = input().split()
flag = "syurui_3"
for i in hina:
  if i == "Y":
    flag = "syurui_4"
if flag == "syurui_3":
  print("Three")
else:
  print("Four")

Submission status: Accepted

Solution code:
_ = input()
s = set(input().split())
print("TFhoruere"[len(s)==4::2])

Submission status: Accepted

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

S = set(s)

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

Submission status: Accepted

Solution code:
# import bisect
# import copy
# import fractions
# import math
# import numpy as np
# from collections import Counter, deque
# from itertools import accumulate,permutations, combinations,combinations_with_replacement,product

def resolve():
    n=int(input())
    S=list(map(str,input().split()))

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



resolve()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from sys import stdin

n = stdin.readline()
s = set(stdin.readline().rstrip().split())
s.remove("P")
s.remove("W")
s.remove("G")
if s:
    print("Four")
else:
    print("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:
a=input()
b=set(input().split())
if len(b) == 3:
  print("Three")
elif len(b) == 4:
  print("Four")

Submission status: Accepted

Solution code:
n=int(input())

t = input().split()
count = []
memo = 0
for i in t:
    if i in count:
        continue
    count.append(i)
    memo += 1
if memo == 3:
    print('Three')
else:
    print('Four')

Submission status: Accepted

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

cnt=0
for i in range(N):
    if S[i]=='Y':
        print('Four')
        break
        cnt=0
    else:
        cnt+=1
if cnt==N:
    print('Three')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

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

Submission status: Accepted

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

if s.count('W') > 0 and s.count('P') > 0 and s.count('G') > 0 and s.count('Y') > 0:
  print('Four')
else:
  print('Three')

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

Submission status: Accepted

Solution code:
#ABC089

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

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

Submission status: Accepted

Solution code:
a = int(input())
b = input().split()
print("Four" if "Y" in b 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())
a = input().split()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter
N=int(input())
c=Counter(list(input().split()))
if(len(c)==4):
    print("Four")
else:
    print("Three")

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:
_ = input()
a_L = list(map(str,input().split()))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = {x for x in input().split()}

if len(A) == 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")
if len(s)==4:
    print("Four")

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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:
t = ['Zero', 'One', 'Two', 'Three', 'Four']
n = int(input())
a = set(input().split())
print(t[len(a)])

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = False
for s in S_list:
    if s == "Y":
        ans = True
        break

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

Submission status: Accepted

Solution code:
N = int(input())
colors = list(input())
judge = 'Three'

for c in colors:
    if (c == 'Y'):
        judge = 'Four'
        break

print(judge)

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:
from collections import Counter
n = int(input())
S = list(input().split())
cS = Counter(S).keys()
if "Y" in cS or len(cS) == 4:
  print("Four")
else:
  print("Three")

Submission status: Accepted

Solution code:
n = int(input())
s = list(map(str, input().split()))
d = {}
for i in range(n):
    if s[i] not in d:
        d[s[i]] = 1
    else:
        d[s[i]] += 1
if len(d.keys()) == 3:
    print('Three')
else:
    print('Four')
#print(d)

Submission status: Accepted

Solution code:
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,sqrt,factorial,hypot,log #log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from fractions import gcd
from random import randint
def ceil(a,b): return (a+b-1)//b
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    N=I()
    S=ST().split()
    S=set(list(S))
    if len(S)==4:
        print("Four")
    else:
        print("Three")
if __name__ == '__main__':
    main()