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: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

color = []

for i in S:
  if i in color:
    pass
  else:
    color.append(i)
    
print(len(color))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

res = []
ans = 0
for i in s:
  if i not in res:
    res.append(i)
    ans += 1
    
if ans == 3:
  print('Three')
else:
  print('Four')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
_,l=map(str,open(0));print("Four" if len(set(l.split(" ")))==4 else "Three")

Submission status: Wrong Answer

Solution code:
n = input()
print(len(set(input().split())))

Submission status: Wrong Answer

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

num = 0
l = []

for i in s:
  if i not in l:
    num += 1
  l.append(i)
print(num)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print('Three' if len(S) else 'Four')

Submission status: Wrong Answer

Solution code:
input()
print(["No","Yes"]["Y" in input()])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
open(0);print("TFhoruere"[len(set(open(0)))==4::2])

Submission status: Wrong Answer

Solution code:
n=int(input())
lst = []
s = input()
for i in range(n):
  if s[i] not in lst:
    lst.append(s[i])
if len(lst) == 4:
  print("Three")
else:
  print("Four")

Submission status: Wrong Answer

Solution code:
n=int(input())
lst = []
s = input()
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: Wrong Answer

Solution code:
n=int(input())
lst = []
s = input()
print(s)
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: Wrong Answer

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]]):
    L.append(c[i])
if len(L)==4:
  print('Four')
else:
  print('Three')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if "Y" in c:
    print("four")
else:
    print("three")

Submission status: Wrong Answer

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

if "Y" in c:
    print("four")
else:
    print("three")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N,*S = open(0).read().split()
print(len(set(S)))

Submission status: Wrong Answer

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':
            count_p+=1
        if S[i]=='W':
            count_w+=1
        if S[i]=='G':
            count_g+=1
        if S[i]=='Y':
            count_y+=1

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

Submission status: Wrong Answer

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: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
Row = int(input())
a = list(map(str,input().split(" ")))
print(len(set(a)))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
# -coding: utf-8 -

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

isFour = False
for i in s:
    if i == "Y":
        isFour = True

if isFour:
    print("Four")
else:
    print("Tree")

Submission status: Wrong Answer

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

for i in range(n):
    if s[i] == "Y":
        print("four")
        break
    elif i == n-1:
        print("Tree")

Submission status: Wrong Answer

Solution code:
n = int(input())
li = []
count =0

liste = [x for x in input().split()]
temp = []

for i in range(len(liste)):
    if liste[i] not in temp:
        temp.append(liste[i])
        count +=1


print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())
li = []
count =0

liste = [x for x in input().split()]
temp = []

for i in range(len(liste)):
    if liste[i] not in temp:
        temp.append(liste[i])


print(len(temp))

Submission status: Wrong Answer

Solution code:
n = int(input())

s_list = list(input().split())
s_set = set(s_list)
answer = len(list(s_set))
print('Four' if answer == 3 else 'Three')

Submission status: Wrong Answer

Solution code:
n = int(input())

s = set([i for i in input().split()])

print(len(s))

Submission status: Wrong Answer

Solution code:
n=int(input())
l=list(input())
if 'Y' in l:
  print(4)
else:
  print(3)

Submission status: Wrong Answer

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

count=[]
for i in s:
  if i not in count:
    count.append(i)
print(len(count))

Submission status: Wrong Answer

Solution code:
n = int(input())
print(len(set(list(map(str,input().split())))))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
num = input()
l = []
l = input().split()
s = set(l)

print(len(s))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#2019/10/15
N, *S = open(0).read().split()
print(len(set(S)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
a = input().split(' ')
a = set(list(a))
print(len(a))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

ans = "Three"
for i in range(len(S)):
  if S[i] == "Y":
    ans = "Four"
    break
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
c = input().split()
print(len(set(c)))

Submission status: Wrong Answer

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: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
from collections import Counter

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

res = 0
for s in counter.values():
    res += s
if s == 3:
    print("Three")
else:
    print("Four")

Submission status: Wrong Answer

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=='G':
    Flag = 1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

input()
# スペース区切りの整数の入力
inputs = input().split()

print(len(set(inputs)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
input()
print(len(set(input().split())))

Submission status: Wrong Answer

Solution code:
N = int(input())
Alist = input().split()
 
a = set(Alist)
print(len(a))

Submission status: Wrong Answer

Solution code:
n = input()
n = int(n)
s = [0] * n
s = input().split()
if s.count("P") + s.count("W") + s.count("G") + s.count("Y") == 4:
  print("Four")
else:
  print("Three")

Submission status: Wrong Answer

Solution code:
n = input()
n = int(n)
s = [0] * n
s = input().split()
if s.count("P") + s.count("W") + s.count("G") + s.count("Y") == 4:
  print("four")
else:
  print("three")

Submission status: Wrong Answer

Solution code:
def solve(S):
    S = set(S)
    if len(S) == 3:
        return "Three"
    else:
        return "Four"
N = int(input())
# N < 100

S = input()
# PWGY
print(solve(S))

Submission status: Wrong Answer

Solution code:
import collections
N = int(input())
S = list(map(str,input().split(' ')))
C = collections.Counter(S)
print(len(C))

Submission status: Wrong Answer

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

print("Four" if "Y" in s else "Tree")

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input().split()
arare = ["P", "W", "G", "Y"]


def hina(S):
    if S in arare:
        arare.remove(S)
    return len(arare)


map(hina, s)
print("Four") if (4 - len(arare) == 4) else print("Three")

Submission status: Wrong Answer

Solution code:
n = int(input())
arare = input().split()
if arare.count("Y") > 0:
	print("FOUR")
else:
	print("THREE")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())

s=list(input())

k=set(s)

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

Submission status: Wrong Answer

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

types = 'Three'
for i in range(len(fukuro)):
  if fukuro[i] == 'Y':
    tyeps = 'Four'
    break
print(types)

Submission status: Wrong Answer

Solution code:
n = int(input()) 
print(len(set([i for i in input().split()])))

Submission status: Wrong Answer

Solution code:
input();"TFhoruere"[len(set(input().split()))>3::2]

Submission status: Wrong Answer

Solution code:
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    n = f()[0]
    s = input().split()

    for i in s:
        if i == 'Y':
            print('4')
            return
    
    print('3')

solve()

Submission status: Wrong Answer

Solution code:
n=input()
s={str(x) for x in input().split()}
print(len(s))

Submission status: Wrong Answer

Solution code:
# ABC089B - Hina Arare
# Editorial ver.
n = int(input())
lst = input().rstrip().split()
print(lst)
print("Four" if "Y" in lst else "Three")

Submission status: Wrong Answer

Solution code:
# ABC089B - Hina Arare
# Editorial ver.
n = int(input())
lst = [input().rstrip().split()]
print("Three" if "Y" not in lst else "Four")

Submission status: Wrong Answer

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

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

print(s)


flag = True

for i in s:
    if i=='Y':
        flag=False
        break

if flag:
    print('Three')
else:
    print('Four')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
print(len(set(input().split())))

Submission status: Wrong Answer

Solution code:
n=int(input())
s=input()
Y=False
for w in s:
    if w=="Y":
        Y=True
if Y==True:
    print("four")
else:
    print("three")

Submission status: Wrong Answer

Solution code:
s=input()
Y=False
for w in s:
    if w=="Y":
        Y=True
if Y==True:
    print("four")
else:
    print("three")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def solve(string):
    n, *s = string.split()
    return "Three" if len(set(s)) == 3 else "Four"


if __name__ == '__main__':
    print(solve(input()))

Submission status: Wrong Answer

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

print(s)

y_n = s.count('Y')

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
Ss = set([s for s in input()])
print(Ss)
if len(Ss)-1==3:
    print("Three")
else:
    print("Four")

Submission status: Wrong Answer

Solution code:
N = int(input())
Ss = set([s for s in input()])
if len(Ss)==3:
    print("Three")
else:
    print("Four")

Submission status: Wrong Answer

Solution code:
N = int(input())
Ss = set([s for s in range(N)])
if len(Ss)==3:
    print("Three")
else:
    print("Four")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
_ = input()
print(['Four', 'Three'][len(set(input())) == 3])

Submission status: Wrong Answer

Solution code:
_ = input()
print(['Four', 'Three'][len(input()) == 3])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
n = int(input())
s = sys.stdin.readline().rstrip().split()
print('THREE' if len(set(s)) == 3 else 'FOUR')

Submission status: Wrong Answer

Solution code:
n = input()
print(len(set(input().split())))

Submission status: Wrong Answer

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

S=list(set(S))

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

Submission status: Wrong Answer

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

S = set(S)
print(len(S))

Submission status: Wrong Answer

Solution code:
S = list(input().split())
c = "kara"
if S == "Y":
	c = "Four"
else :
	c = "Three"
	
print(c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
s = [map(int,input().split())]
s_s = set(s)
print(len(s_s))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
input()
print(['Tree', 'Four']['Y' in input()])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
zenbu = int(input())
mame = [i for i in input().split()]

kiiro = 0

for mame in range(zenbu):
    if mame == 'Y':
       kiiro = 1
       break

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

Submission status: Wrong Answer

Solution code:
n = int(input())
li = list(input().split())
print(len(set(li)))

Submission status: Wrong Answer

Solution code:
n = int(input())
li = []
for i in range(n):
    li.append(i)
print(len(set(li)))

Submission status: Wrong Answer

Solution code:

N = int(input())

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

if "Y" in S:
    print("four")

else:
    print("three")

Submission status: Wrong Answer

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

si = [print('Four')if 'Y' in s else print('Tree') ]

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
araresuu = input()
sikou = input().split()
kaisuu = 0
for i in sikou:
    if i == 'Y':
        print('Four')
        break
    kaisuu += 1
if kaisuu == araresuu:
    print('Three')

Submission status: Wrong Answer

Solution code:
araresuu = input()
sikou = input()
kaisuu = 0
for i in sikou:
    if i == 'Y':
        print('four')
        break
    kaisuu += 1
if kaisuu == len(sikou):
    print('Three')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
l=list(input().split())
a=set(l)
print(len(a))

Submission status: Wrong Answer

Solution code:
ips = []
ips.append(input())
while True:
    try:
        ips.append(input())
    except (EOFError):
        break
num = int(ips[0])
hina = ips[1]
v = []
for i in range(num):
    if hina[i] not in v:
        v.append(hina[i])
if len(v) == 3:
    print("Three")
elif len(v) == 4:
    print("Four")

Submission status: Wrong Answer

Solution code:
ips = []
ips.append(input())
while True:
    try:
        ips.append(input())
    except (EOFError):
        break
num = int(ips[0])
hina = ips[1]
v = []
for i in range(num):
    if hina[i] not in v:
        v.append(hina[i])
if len(v) == 3:
    print("three")
elif len(v) == 4:
    print("four")

Submission status: Wrong Answer

Solution code:
ips = []
ips.append(input())
while True:
    try:
        ips.append(input())
    except (EOFError):
        break
num = int(ips[0])
hina = ips[1]
v = []
for i in range(num):
    if hina[i] not in v:
        v.append(hina[i])
print(len(v))

Submission status: Wrong Answer

Solution code:
x = input().split(" ")
t = True
for i in x:
    if i == 'Y':
        t = False
        continue

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

Submission status: Wrong Answer

Solution code:
x = input().split(" ")
t = True
for i in x:
    if i == 'Y':
        t = False

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

Submission status: Wrong Answer

Solution code:
n = int(input())
items = set(input().split())
results = {3: 'Tree', 4: 'Four'}
if len(items) in results:
    print(results[len(items)])

Submission status: Wrong Answer

Solution code:
N = int(input())
a = input().split()
if 'Y' in a:
    print('four')
else:
    print('three')

Submission status: Wrong Answer

Solution code:
a = input().split()
if 'Y' in a:
    print('four')
else:
    print('three')

Submission status: Wrong Answer

Solution code:
a = input().split()
if 'Y' in a:
    print('4')
else:
    print('3')

Submission status: Wrong Answer

Solution code:
a = input().split()
if 'Y' in a:
    print(4)
else:
    print(3)

Submission status: Wrong Answer

Solution code:
n = int(input())
l = list(str(i) for i in input().split()) 

if 'Y' in l:
    print("Four")
else:
    print("three")

Submission status: Wrong Answer

Solution code:
n = int(input())
color = input().split()
print(color)

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

Submission status: Wrong Answer

Solution code:
n = int(input())
l = list(str(i) for i in input().split()) 
newl = []
kensaku = 'Y'
if any(s.endswith(kensaku) for s in l):
    print("Four")
else:
    print("three")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#-*-cording:utf-8-*-
N = int(input())
hoge = input()
P=0
W=0
G=0
Y=0
p=hoge.find("P")
print(p)
if p==-1:
    P=1
w=hoge.find("W")
if w==-1:
    W=1
g=hoge.find("G")
if g==-1:
    G=1
y=hoge.find("Y")
if y==-1:
    Y=1
ans=4-P-W-G-Y
if ans==3:
    print("Three")
else:
    print("Four")

Submission status: Wrong Answer

Solution code:
#-*-cording:utf-8-*-
N = int(input())
hoge = input()
P=0
W=0
G=0
Y=0
p=hoge.find("P")
if p==None:
    P=1
w=hoge.find("W")
if w==None:
    W=1
g=hoge.find("G")
if g==None:
    G=1
y=hoge.find("Y")
if y==None:
    Y=1
ans=4-P-W-G-Y
if ans==3:
    print("Three")
else:
    print("Four")

Submission status: Wrong Answer

Solution code:
#-*-cording:utf-8-*-
N = int(input())
hoge = input()
P=0
W=0
G=0
Y=0
p=hoge.find("P")
if p==0:
    P=1
w=hoge.find("W")
if w==0:
    W=1
g=hoge.find("G")
if g==0:
    G=1
y=hoge.find("Y")
if y==0:
    Y=1
ans=4-P-W-G-Y
if ans==3:
    print("Three")
else:
    print("Four")

Submission status: Wrong Answer

Solution code:
N = int(input())
S = input()
S = S.split(" ")
p,w,g,y = 0,0,0,0

for i in S:
    #print (i)
    if i == 'P':
        p+=1
    elif i == 'W':
        w+=1
    elif i == 'G':
        g+=1
    elif i == 'Y':
        y+=1

if p * w * g * y != 0:
    print('Four')
else:
    print('three')

Submission status: Wrong Answer

Solution code:
from math import *

n = int(input())
s = input()
b = False
for x in range(len(s)):
  if x is 'Y':
    b = True
    break
print('Four' if b else 'Three')

Submission status: Wrong Answer

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

for i in range(N):
    if S[i]=='Y':
        num = +1
        break

if num>=1:
    print('Four')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

N = input()
S = raw_input().split()
for i in range(N):
	if S[i] == 'Y':
		print('Four')
		N = -1
		break
if N == -1:
	print('Three')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import collections
n = input()
print(len(collections.Counter(input().replace(" ",""))))

Submission status: Wrong Answer

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

for i in range(N):
    if arare[i] == 'Y':
        print('Three')
        break
else:
    print('Four')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
input()
print(len(set(input().split())))

Submission status: Wrong Answer

Solution code:
n=int(input())
str=input()
ans=3
for i in range(0,n):
    if str[i]=="Y":
        ans=4
print(ans)

Submission status: Wrong Answer

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
S = list(map(str, input().split()))
A = 0
for i in range(N):
    for j in range(N-1):
        for k in range(N-2):
            for l in range(N-3):
                if S[i] != S[j+1] and S[j+1] != S[k+2]and S[k+2] != S[l+3] and S[l+3] != S[i] and S[j+1] != S[l+3] and S[i] != S[k+2]:
                    A = A+1
if A != 0:
    print("Four")
else:
    print("Three")

Submission status: Accepted

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