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:
from collections import Counter
n = int(input())
S = Counter(input().split())
print('Four' if len(S) == 4 else 'Three')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=input()
a=[i for i in 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 = len(list(set(s)))

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

s = list(set(s))

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

Submission status: Accepted

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

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
#from math import gcd
import bisect
from collections import defaultdict
from collections import deque
from functools import lru_cache


#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')

#############
# Functions #
#############

######INPUT######
def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]

######OUTPUT######
def Yes(): print("Yes"); return
def No(): print("No"); return

#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0: 
        cnt+=1 
        temp //= i
      arr.append([i, cnt])
  if temp!=1:
    arr.append([temp, 1])
  if arr==[]:
    arr.append([n, 1])
  return arr

#####MakeDivisors######
def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors

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

#####BitCount#####
def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count

#####ChangeBase#####
def Base_10_to_n(X, n):
  if X//n:
    return Base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def Base_n_to_10(X, n):
  return sum(int(str(X)[-i])*n**i for i in range(len(str(X))))

#####IntLog#####
def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count

#############
# Main Code #
#############

N = inputI()
s = len(set(inputSL()))

if s == 3:
  print("Three")
else:
  print("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())

l = len(set(list(map(str, input().split()))))

if l == 1:
    print("One")
elif l == 2:
    print("Two")
elif l == 3:
    print("Three")
else:
    print('Four')

Submission status: Accepted

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

Submission status: Accepted

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

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
input = sys.stdin.readline

N = int(input().rstrip())
array = input().rstrip().split()

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque
from decimal import *

import numpy


if __name__ == '__main__':
    an = int(input())
    a = [i for i in input().split()]
    ans = len(set(a))

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Fri May 15 13:53:37 2020

@author: shinba
"""

n = int(input())

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

Submission status: Accepted

Solution code:
import sys
import math
import bisect

def solve(A):
    if len(set(A)) == 3:
        return 'Three'
    else:
        return 'Four'

def main():
    n = int(input())
    A = input().split()
    print(solve(A))

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

l = []
for i in s:
  if i not in l:
    l.append(i)
if len(l) == 3:
  print('Three') 
else:
  print('Four')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=str(input())
s=list(map(str,input().split()))
s=set(s)
if len(s)==4:
  print("Four")
elif len(s)==3:
  print("Three")
elif len(s)==2:
  print("Two")
else:
  print("One")

Submission status: Accepted

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    S = input()

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter

def resolve():
	n = int(input())
	s = input().split()
	c = Counter(s)
	if len(c.keys()) == 3:
		print('Three')
	else:
		print('Four')
resolve()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

for i in range(n):
    if s[i] == 'Y':
        cnt += 1

if cnt == 0:
    print('Three')
else:
    print('Four')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
s = list(map(str, input().split()))
f = [False] * 4
for i in range(n):
    if s[i] == 'P':
        f[0] = True

    elif s[i] == 'W':
        f[1] = True
    
    elif s[i] == 'G':
        f[2] = True
    
    else:
        f[3] = True

if sum(f) == 3:
    print('Three')

elif sum(f) == 4:
    print('Four')

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# region header
import sys
import math
from bisect import bisect_left, bisect_right, insort_left, insort_right
from collections import defaultdict, deque, Counter
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from heapq import heappop, heappush
from itertools import accumulate, groupby, product, permutations, combinations, combinations_with_replacement
from math import ceil, floor, factorial, log, sqrt, sin, cos
from operator import itemgetter
from string import ascii_lowercase, ascii_uppercase, digits
sys.setrecursionlimit(10**7)
rs = lambda: sys.stdin.readline().rstrip()
ri = lambda: int(rs())
rf = lambda: float(rs())
rs_ = lambda: [_ for _ in rs().split()]
ri_ = lambda: [int(_) for _ in rs().split()]
rf_ = lambda: [float(_) for _ in rs().split()]
INF = float('inf')
MOD = 10 ** 9 + 7
PI = math.pi
# endregion
N = ri()
S = list(Counter(rs_()))
print('Three' if len(S) == 3 else 'Four')

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

Submission status: Accepted

Solution code:
n = int(input())
lis = list(input().split())
dic = {}
for a in lis:
  if a in dic:
    dic[a] += 1
  else:
    dic[a] = 1
count = 0
for b in dic.keys():
  count += 1
if count == 3:
  print("Three")
else:
  print("Four")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print([0,1,2,'Three','Four'][0*int(input())+len(set(input().split()))])

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=input()
print("Four" if "Y" in s else "Three")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
S = [s for s in input().split()]
if(len(set(S))==4):
    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:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7
#s=input().rstrip()

n=I()
u=input().rstrip().split(" ")
if "Y" in u:
    print("Four")
else:
    print("Three")

Submission status: Accepted

Solution code:
from collections import Counter

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

if len(Counter(S)) == 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:
n=int(input())
dic={}.fromkeys(map(str,input().split()))
if len(dic)==3:
  print("Three")
if len(dic)==4:
  print("Four")

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())
a = list(map(str,input().split()))
ans = 0
for i in range(n):
  if a[i] == 'Y':
    ans +=1
if ans > 0:
  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')
elif len(s) == 4:
    print('Four')

Submission status: Accepted

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

Submission status: Accepted

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

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

print(number)

Submission status: Accepted

Solution code:
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop

import collections

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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 len(set(s)) == 3:
    print('Three')
else:
    print('Four')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
lst = []
s = input().split(" ")
for i in range(n):
  if s[i] not in lst:
    lst.append(s[i])
if len(lst) == 3:
  print("Three")
else:
  print("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 accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(str, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
S = LIST()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

count = 0
if 'P' in s:
    count += 1
if 'W' in s:
    count += 1
if 'G' in s:
    count += 1
if 'Y' in s:
    count += 1

print('Three' if count == 3 else 'Four')

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
c=list(map(str, input().split()))
L=[]
for i in range(n):
  if len([1 for l in L if l==c[i]]) == 0:
    L.append(c[i])
if len(L)==4:
  print('Four')
else:
  print('Three')

Submission status: Accepted

Solution code:
a=int(input())
b=list(map(str,input().split()))
ans="Three"
for i in range(a):
    if b[i]=="Y":
        ans="Four"
print(ans)

Submission status: Accepted

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

print('Four' if n==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()
if len(set(S)) == 4:
    print('Four')
elif len(set(S)) == 3:
    print('Three')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,S=open(0);print('TFhoruere'[len(set(S.split()))%2<1::2])

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())
li = input().split()
li2 = set(li)
if len(li2) == 3:
    print("Three")
elif len(li2) == 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:
x = ['One', 'Two', 'Three', 'Four']
n = int(input())
a = len(set(input().split()))

print(x[a-1])

Submission status: Accepted

Solution code:
n=int(input())
s=set(input().split())
print("Four" if len(s)==4 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
## io
IS = lambda: sys.stdin.readline().rstrip()
II = lambda: int(IS())
MII = lambda: list(map(int, IS().split()))
MIIZ = lambda: list(map(lambda x: x-1, MII()))
## dp
INIT_VAL = 0
DP2 = lambda d1, d2: [[INIT_VAL]*d2 for _ in range(d1)]
DP3 = lambda d1, d2, d3: [[[INIT_VAL]*d3 for _ in range(d2)] for _ in range(d1)]

def main():
    n = II()
    hina = IS().split()
    t = len(set(hina))
    if t == 3: print('Three')
    else: print('Four')

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
N=int(input())
sset=set(input().split())
#print(len(sset))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    from collections import Counter

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

    ctr = Counter(s)
    cond = len(ctr.keys()) == 3
    print('Three' if cond else 'Four')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
icase=0
if icase==0:
    n=int(input())
    s=list(input().split())
    s.sort()
    if s[-1]=="Y":
        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:
import sys
input = sys.stdin.readline

def main():
    N = int(input())
    for s in input().split():
        if s == "Y":
            print("Four")
            sys.exit()
    print("Three")

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n=int(input())
List=[]
s=[0]*n
s=list(input().split())
for i in range(n):
  if (List.count(s[i])==0):
    List.append(s[i])
print("Three" if (len(List)==3) else "Four")

Submission status: Accepted

Solution code:
N = input() #Yが一回でもあればいい
S = list(input().split())
if 'Y' in S:
    print('Four')
else:
    print('Three')

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

if len(s) == 3:
    print("Three")
elif len(s) == 4:
    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:
import sys
n, *s = sys.stdin.read().split()

def main():
  print('Four' if len(set(s)) == 4 else 'Three')
  
if __name__ == '__main__':
  main()

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 = set(input().split())

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

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,*s=map(str,open(0).read().split())
if "Y" in s:
  print("Four")
else:
  print("Three")

Submission status: Accepted

Solution code:
# import sys
# import math #sqrt,gcd
# import decimal
import queue # queue
# import bisect
# import heapq # priolity-queue
# import time
# from itertools import product,permutations,combinations,combinations_with_replacement
# 重複あり順列、順列、組み合わせ、重複あり組み合わせ
# import collections # deque
# from operator import itemgetter,mul
# from fractions import Fraction
# from functools import reduce

mod = int(1e9+7)
INF = 1<<29
lINF = 1<<35

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

def main():
    n = int(input())
    s = input().split()
    m = set()
    for i in range(n):
        m.add(s[i])
    if len(m)==3:
        print("Three")
    else:
        print("Four")
    return

if __name__=='__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin,setrecursionlimit
setrecursionlimit(10 ** 7)

n = int(stdin.readline().rstrip())
s = input().split()

li = set()

for i in s:
    li.add(i)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def resolve():
  n = int(input())
  s = list(input().split())
  for c in s:
    if c == 'Y':
      print('Four')
      return

  print('Three')
  return

if __name__ == "__main__":
  resolve()

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:
N = int(input())
s = input().split()
flag = False
for i in s:
    if i=="Y":
        flag = True
print('Four' if flag ==True else 'Three')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = input().split()
cnt = {}
for x in s:
    if x not in cnt:cnt[x] = 1
    else:cnt[x] +=1
if len(cnt) == 3:
    print('Three')
else:print('Four')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
l = input().split()
if len(set(l)) == 4:
    print('Four')
else:
    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")
        break
else:
    print("Three")

Submission status: Accepted

Solution code:
# solution
import io

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC 089: B – Hina Arare
n = int(input())
s = input().split()
print('Four' if 'Y' in s else 'Three')