peterverebics/CodeNet_Python_118 huggingface dataset:
T = {"AC":0, "WA":0, "TLE":0, "RE":0}
N = int(input())
for i in range(N):
    s = input()
    T[s] += 1

for i, j in T.items():
    print(i,end=" ")
    print("×",end=" ")
    print(j)
N = int(input())
for i in range(N):
    S = input().split()
    a = list(S)
    a.append(S)
    i += 1
print("AC" + " x " + str(a.count("AC")))
print("WA"+ " x "+ str(a.count("WA")))
print("TLE" + " x " + str(a.count("TLE")))
print("RE" + " x " + str(a.count("RE")))
n = int(input())
ac = "AC"
wa = "WA"
tle = "TLE"
re = "RE"

ans = [0, 0, 0, 0]
for _ in range(n):
    a = input()
    if (a == ac):
        ans[0] += 1
    if (a == wa):
        ans[1] += 1
    if (a == tle):
        ans[2] += 1
    if (a == re):
        ans[3] += 1

print("AC x ",ans[0])
print("WA x ",ans[1])
print("TLC x ",ans[2])
print("RE x ",ans[3])
N = int(input())
c0=[]
c1=[]
c2=[]
c3=[]
for i in range(N):
    S = input()
    if S == "AC":
        c0.append(S)
    elif S == "WA":
        c1.append(S)
    elif S == "TLE":
        c2.append(S)
    elif S == "RE":
        c3.append(S)

print("AC","×",len(c0))
print("WA","×",len(c1))
print("TLE","×",len(c2))
print("RE","×",len(c3))
N = int(input())

C0 = 0
C1 = 0
C2 = 0
C3 = 0

for i in range(0,N):
  S = str(input())
  if S == 'AC':
    C0 += 1
  elif S == 'WA':
    C1 += 1
  elif S == 'TLE':
    C2 += 1
  elif S == 'RE':
    C3 += 1
    
print('AC ×',C0)
print('WA ×',C1)
print('TLE ×',C2)
print('RE ×',C3)
N=int(input())
 
a=0
w=0
t=0
r=0
 
for i in range(N):
  s=input()
  if s=="AC":
    a+=1
  elif s=="WA":
    w+=1
  elif s=="TLE":
    t+=1
  elif s=="RE":
    r+=1

print("AC ×",a)
print("WA ×",w)
print("TLE ×",t)
print("RE ×",r)
n=int(input())
ac=0
wa=0
tle=0
re=0
for i in range(n):
    x=input()
    if (x=="RE"):
        re+=1
    if (x=="WA"):
        wa+=1
    if (x=="TLE"):
        tle+=1
    if (x=="AC"):
        ac+=1
print("AC *",ac)
print("WA *",wa)
print("TLE *",tle)
print("RE *",re)
n = int(input())
ac = 0
wa = 0
tle = 0
re = 0
s = ""
for i in range(n):
    s = input()
    if s == "AC":
        ac += 1
    elif s == "WA":
        wa += 1
    elif s == "TLE":
        tle += 1
    else:
        re += 1
print(f"AC × {ac}\nWA × {wa}\nTLE × {tle}\nRE × {re}")
loop_count = int(input())

ac_count = 0
wa_count = 0
tle_count = 0
re_count = 0

for i in range(loop_count):
    result = input()
    if result == 'AC':
        ac_count += 1
    elif result == 'WA':
        wa_count += 1
    elif result == 'TLE':
        tle_count += 1
    else:
        re_count += 1

print("AC × {0}".format(str(ac_count)))
print("WA × {0}".format(str(wa_count)))
print("TLE × {0}".format(str(tle_count)))
print("RE × {0}".format(str(re_count)), end="")
N=int(input())

list=[]
for i in range(N):
    list.append(str(input()))


a = list.count("AC")
b = list.count("WA")
c = list.count("TLE")
d = list.count("RE")

print("AC × "+ str(a))
print("WA × "+ str(b))
print("TLE × "+ str(c))
print("RE × "+ str(d))
n= int(input())
ac=str("AC X")
wa=str("WA X")
tle=str("TLE X")
re=str("RE X")
a=0;b=0;c=0;d=0
for i in range(n):
    p=input()
    if(p=="AC"):
        a+=1
    if(p=="WA"):
        b+=1
    if (p == "TLE"):
        c += 1
    if (p == "RE"):
        d += 1
print(ac,a)
print(wa,b)
print(tle,c)
print(re,d)
N = int(input())
i = 0
C0 = 0
C1 = 0
C2 = 0
C3 = 0
while (i < N):
  i += 1
  S = input()
  if(S == 'AC'):
    C0 += 1
  elif(S == 'WA'):
    C1 += 1
  elif(S == 'TLE'):
    C2 += 1
  else:
    C3 += 1

print("AC × " +  str(C0))
print("WA × " +  str(C1))
print("TLE × " +  str(C2))
print("RE × " +  str(C3))
N=int(input())
l=[]
for i in range(N):
  a=input()
  l.append(a)
AC_num=l.count("AC")
WA_num=l.count("WA")
TLE_num=l.count("TLE")
RE_num=l.count("RE")
print("AC ×",AC_num)
print("WA ×",WA_num)
print("TLE ×",TLE_num)
print("RE ×",RE_num)
N = int (input())

S = [input() for i in range(0,N)]

C0=0 #AC
C1=0 #WA
C2=0 #TLE
C3=0 #RE

for i in range(0,N):
    if S[i]=='AC':
        C0+=1
    elif S[i]=='WA':
        C1+=1
    elif S[i]=='TLE':
        C2+=1
    elif S[i]=='RE':
        C3+=0

print('AC x', C0)
print('WA x', C1)
print('TLE x', C2)
print('RE x', C3)
N = []
N.append(input())

print("AC" + " x "+ str(N.count("AC")))
print("WA" + " x "+ str(N.count("WA")))
print("TLE" + " x "+ str(N.count("TLE")))
print("RE" + " x "+ str(N.count("RE")))
import math
import collections


def main():
  N = int(input())
  S = [input() for _ in range(N)]
  
  A = collections.Counter(S)
  
  
  print('AC × ' + str(A['AC']))
  print('WA × ' + str(A['WA']))
  print('TLE × ' + str(A['TLE']))
  print('RE × ' + str(A['RE']))
  
  
  
main()
n = int(input())
s = [input() for _ in range(n)]

c = [s.count("AC"),s.count("WA"),s.count("TLE"),s.count("RE")]

print("AC","×",c[0])
print("WA","×",c[1])
print("TLE","×",c[2])
print("RE","×",c[3])
n = int(input())
a = [input() for i in range(n)]
ac = 0
wa = 0
tle = 0
re = 0
for s in a:
  if s=='AC':
    ac+=1
  if s=='WA':
    wa+=1
  if s=='TLE':
    tle+=1
  if s=='RE':
    re+=1
print(f'AC × {ac}')
print(f'WA × {wa}')
print(f'TLE × {tle}')
print(f'RE × {re}')
N=int(input())
lis=[0,0,0,0]
for i in range(N):
  tmp=input()
  if tmp=="AC":
    lis[0]+=1
  elif tmp=="WA":
    lis[1]+=1
  elif tmp=="TLE":
    lis[2]+=1
  else:
    lis[3]+=1
print("AC × "+str(lis[0]))
print("WA × "+str(lis[1]))
print("TLE × "+str(lis[2]))
print("RE × "+str(lis[3]))
n = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for i in range(n):
    s = input()
    if s == "AC":
        ac += 1
    elif s == "WA":
        wa += 1
    elif s == "TLE":
        tle += 1
    else:
        re += 1
print(f"AC × {ac}\nWA × {wa}\nTLE × {tle}\nRE × {re}")
t = int(input())

c1, c2, c3, c4 = 0, 0, 0, 0
for i in range(t):
	s = input()
	if s == 'AC':
		c1 += 1
	elif s == 'TLE':
		c2 += 1
	elif s == 'WA':
		c3 += 1
	else:
		c4 += 1
print('AC *', c1)
print('WA *', c3)
print('TLE *', c2)
print('RTE *', c4)
N = int(input())
S = [i for i in str(input())]

print("AC x " + str(S.count('AC')))
print("WA x " + str(S.count('WA')))
print("TLE x " + str(S.count('TLE')))
print("RE x " + str(S.count('RE')))
n = int(input())

ac = 0
wa = 0
tle = 0
re = 0

for i in range(n):
  s = input()
  if s == "AC":
    ac += 1
  if s == "WA":
    wa += 1
  if s == "TLE":
    tle += 1
  if s == "RE":
    re += 1
    
print("AC x " + str(ac))
print("WA x " + str(wa))
print("tle x " + str(tle))
print("re x " + str(re))
# import sys;input = lambda : sys.stdin.readline()
import collections
d=collections.defaultdict(lambda:0)
for _ in range(int(input())):
    s=input()
    d[s]+=1
print("AC X",d['AC'])
print("WA X",d['WA'])
print("TLE X",d["TLE"])
print("RE X",d['RE'])
from sys import stdin


n, *s = (x.rstrip() for x in stdin.readlines())

ac = s.count('AC')
wa = s.count('WA')
tle = s.count('TLE')
re = s.count('RE')

print(f'AC × {ac}')
print(f'WA × {wa}')
print(f'TLE × {tle}')
print(f'RE × {re}')
N = int(input())
S_list = [input() for i in range(N)]
AC = S_list.count('AC')
WA = S_list.count('WA')
TLE = S_list.count('TLE')
RE = S_list.count("RE")
print('AC × {}'.format(AC))
print('WA × {}'.format(WA))
print('TLE × {}'.format(TLE))
print('RE × {}'.format(RE))
N = int(input())
Si = [input for i in range(N)]

C0 = 0
C1 = 0
C2 = 0
C3 = 0

for in1 in Si:
    if in1 == "AC":
        C0 +=1
    elif in1 == "WA":
        C1 += 1
    elif in1 == "TLE":
        C2 += 1
    elif in1 == "RE":
        C3 += 1

print("AC x {}".format(C0)) 
print("WA x {}".format(C1)) 
print("TLE x {}".format(C2)) 
print("RE x {}".format(C3))
n = int(input())
result = ['AC','WA','TLE','RE']
c = [0]*4

for i in range(n):
    str = input()
    for n,r in enumerate(result):
        if str == r:
            c[n] += 1

for i in range(4):
    print(result[i], ' × ', c[i])
N = int(input())

ac = 0
wa = 0
tle = 0
re = 0
for i in range(N):
  st = str(input())
  if(st == 'AC'):
    ac += 1
  elif(st == 'WA'):
    wa += 1
  elif(st == 'TLE'):
    tle += 1
  else:
    re += 1

print('AC × {}'.format(ac))
print('WA × {}'.format(wa))
print('TLE × {}'.format(tle))
print('RE × {}'.format(re))
N = int(input())
i = 0
C0 = 0
C1 = 0
C2 = 0
C3 = 0
while (i < N):
  i += 1
  S = input()
  if(S == 'AC'):
    C0 += 1
  elif(S == 'WA'):
    C1 += 1
  elif(S == 'TLE'):
    C2 += 1
  elif(S == 'RE'):
    C3 += 1

print("AC ×" +  str(C0))
print("WA ×" +  str(C1))
print("TLE ×" +  str(C2))
print("RE ×" +  str(C3))
n = int(input())
s = list(input() for _ in range(n))
print("AC × " + str(s.count("AC")))
print("WA × " + str(s.count("WA")))
print("TLE × " + str(s.count("TLE")))
print("RE × " + str(s.count("RE")))
n=int(input())

judge_list=[]
for i in range(n):
    a=input()
    judge_list.append(a)
    
ac=judge_list.count('AC')
ac=str(ac)
wa=judge_list.count('WA')
wa=str(wa)
tle=judge_list.count('TLE')
tle=str(tle)
re=judge_list.count('RE')
re=str(re)

print("AC"+" "+"×"+" "+ac)
print("WA"+" "+"×"+" "+wa)
print("TLE"+" "+"×"+" "+tle)
print("RE"+" "+"×"+" "+re)
N = int(input())
S=[]
for _ in range(N):
    S.append(input())

C = [0,0,0,0]
judge = ['AC','WA','TLE','RE']

for i in range(N):
    for j in range(4):
        if judge[j]==S[i]:
            C[j]=C[j]+1

for k in range(4):
    print(f'{judge[k]} ×　{C[k]}')
N=map(int,input().split())
S=list(map(str,input().split()))

AC=S.count('AC')
WA=S.count('WA')
TLE=S.count('TLE')
RE=S.count('RE')

print("AC × ", end='') 
print(AC)
print("WA × ", end='') 
print(WA)
print("TLE × ", end='') 
print(TLE)
print("RE × ", end='') 
print(RE)
N=int(input())
 
a=0
w=0
t=0
r=0
 
for i in range(N):
  s=input()
  if s=="AC":
    a+=1
  elif s=="WA":
    w+=1
  elif s=="TLE":
    t+=1
  else:
    r+=1

print("AC ×",a)
print("WA ×",w)
print("TLE ×",t)
print("RE ×",r)
n = int(input())

a = 0
b = 0
c = 0
d = 0

for i in range(n):
    s = input()
    if s == 'AC':
        a += 1
    elif s == 'WA':
        b += 1
    elif s == 'TLE':
        c += 1
    else:
        d += 1
        
print('AC ×', a)
print('WA ×', b)
print('TLE ×', c)
print('RE ×', d)
n = int(input())
S = []
for i in range(n):
    S.append(input())
cnt_ac = 0
cnt_tle = 0
cnt_wa = 0
cnt_re = 0


for i in range(n):
    if S[i] == "AC":
        cnt_ac += 1
    elif S[i] == "TLE":
        cnt_tle += 1
    elif S[i] == "WA":
        cnt_wa += 1
    elif S[i] == "RE":
        cnt_re += 1

print("AC x　" + str(cnt_ac))
print("WA x　" + str(cnt_wa))
print("TLE x　" + str(cnt_tle))
print("RE x　" + str(cnt_re))
n=int(input())
c1,c2,c3,c4=0,0,0,0
for i in range(n):
  s=input()
  if(s=='AC'):
    c1+=1
  elif(s=='WA'):
    c2+=1
  elif(s=='TLE'):
    c3+=1
  else:
    c4+=1
print('AC X'+' '+str(c1))
print('WA X'+' '+str(c2))
print('TLE X'+' '+str(c3))
print('RE X'+' '+str(c4))
N = int(input())
C = 0
D = 0
E = 0
F = 0
S = ''

for i in range(N):
    S = input()
    if S == 'AC':
        C += 1
    elif S == 'WA':
        D += 1
    elif S == 'TLE':
        E += 1
    elif S == 'RE':
        F += 1
print('AC × '+ str(C))
print('WA × '+ str(D))
print('TLE × '+ str(E))
print('RE × '+ str(F))
a=int(input())

s=[input() for i in range(a)]

print("AC × {:d}".format(s.count("AC")))
print("WA × {:d}".format(s.count("WA")))
print("TLE × {:d}".format(s.count("TLE")))
print("RE × {:d}".format(s.count("RE")))
n = int(input())
s = [input() for _ in range(n)]
ac, wa, tle, re = 0, 0, 0, 0

for i in range(n):
    if "AC" in s[i]:
        ac += 1
    elif "WA" in s[i]:
        wa += 1
    elif "TLE" in s[i]:
        tle += 1
    elif "RE" in s[i]:
        re += 1
print("AC × ",ac)
print("WA × ",wa)
print("TLE × ",tle)
print("RE × ",re)
n = int(input())
s=[]
for x in range(n):
    s.append(input())
a={"AC":0, "WA":0,"TLE":0,"RE":0}
for x in s:
    print(x)
    a[x]+=1
print("AC x %s" % a["AC"])
print("WA x %s" % a["WA"])
print("TLE x %s" % a["TLE"])
print("RE x %s" % a["RE"])
from collections import Counter
n = int(input())
s = list(str(input()) for _ in range(n))
C_s = Counter(s)
s_l = ['AC', 'WA', 'TLE', 'RE']
for item in s_l:
    print(item, ' X ', C_s[item])
import collections
n = int(input())
m = [input() for i in range(n)]

check = ["AC","WA","TLE","RE"]
m = m+check


c = collections.Counter(m)

for i,j in c.items():
  print(i+ " x " +str(j-1))
N = int(input())
A = [input() for i in range(N)]

print('AC × {}'.format(A.count('AC')))
print('WA × {}'.format(A.count('WA')))
print('TLE × {}'.format(A.count('TLE')))
print('RE × {}'.format(A.count('RE')))
n=int(input("Test cases"))
d={"AC":0,"WA":0,"TLE":0,"RE":0}
for i in range(n):
  x=input()
  d[x]=d[x]+1
for k,v in d.items():
	print(k,"x",v)
N = int(input())
G0,G1,G2,G3=0,0,0,0
for i in range(N):
    Si=input()
    if Si == 'AC':
        G0 = G0+1

    elif Si=='WA':
        G1=G1+1

    elif Si=='TLE':
        G2=G2+1
    
    else:
        G3=G3+1
 
print('AC G' +str(G0))
print('WA G' +str(G1))
print('TLE G'+str(G2))
print('RE G' +str(G3))
N = int(input())
lists = []
AC = 0
TLE = 0
WA = 0
RE = 0
for i in range(N):
    S = str(input())
    lists.append(S)
for o in lists:
    if o == "AC":
        AC +=1
    elif o == "TLE":
        TLE +=1
    elif o == "WA":
        WA +=1
    elif o == "RE":
        RE +=1
print("AC X "+str(AC))
print("WA X "+str(WA))
print("TLE X "+str(TLE))
print("RE X "+str(RE))
n = int(input())
ans = {'AC': 0, 'WA':0, 'TLE':0, 'RE':0}
for i in range(n):
    s = input()
    ans[s] = ans[s] + 1

for s in ans.keys():
    print("{} × {}".format(s, ans[s]))
n = int(input())
s = [input() for i in range(n)]
print('AC x' + str((s.count('AC'))))
print('WA x' + str((s.count('WA'))))
print('TLE x' + str((s.count('TLE'))))
print('RE x' + str((s.count('RE'))))
from collections import Counter

n = int(input())
a = []
for _ in range(n):
  a.append(input())

dct = dict(Counter(a))
for v, num in dct.items():
  print(v + " x " + str(num))
a=int(input())
b=[input() for i in range(a)]
c=b.count("AC")
d=b.count("WA")
e=b.count("TLE")
f=b.count("RE")
print("AC × {}".format(c))
print("WA × {}".format(d))
print("TLE × {}".format(e))
print("RE × {}".format(f))
num=input()
if int(num)<=1000:
    change=1000-int(num)
else:
    array_1=list(num)
    array_1=array_1[-4:]
    a=''.join(array_1)
    b=int(array_1[-4])+1
    pay=b*1000
    change=pay-int(a)
    if array_1[-1]=="0" and array_1[-2]=="0" and array_1[-3]=="0":
        change=0
print(change)
"""B - Judge Status Summary"""
N = int(input())
ac, wa, tle, re = 0, 0, 0, 0
for i in range(N):
    S = input()
    if S == "AC":
        ac = +1
    elif S == "WA":
        wa = +1
    elif S == "TLE":
        tle = +1
    else:
        re = +1

print("AC x "+str(ac))
print("WA x "+str(wa))
print("TLE x "+str(tle))
print("RE x "+str(re))
n = int(input())
s = []

ac = 0
wa = 0
tle = 0
re = 0

for i in range(n):
  s.append(input())
  if s[i] == "AC":
    ac += 1
  elif s[i] == "WA":
    wa += 1
  elif s[i] == "TLE":
    tle += 1
  else:
    re += 1

print("AC × " + str(ac))
print("WA × " + str(wa))
print("TLE × " + str(tle))
print("RE × "+ str(re))
N = int(input())
S = []
for _ in range(N):
    S.append(input()) 
a = S.count('AC')
b = S.count('WA')
c = S.count('TLE')
d = S.count('RE')
print ('AC ×' +' ' + str(a))
print('WA ×' + ' '+ str(b))
print('TLE ×' +' ' + str(c))
print('RE ×' +' '+ str(d))
AC,WA,TLE,RE=0,0,0,0
for T in range(int(input())):
	S=input()
	if S=="AC":AC+=1
	elif S=="WA":WA+=1
	elif S=="TLE":TLE+=1
	else:RE+=1
	print("AC x", AC)
	print("WA x", WA)
	print("TLE x", TLE)
	print("RE x", RE)
N = int(input())
G0, G1, G2, G3 = 0, 0, 0, 0
for i in range(N):
    Si=input()
    if Si == 'AC':
        G0 += 1

    elif Si=='WA':
        G1 += 1

    elif Si=='TLE':
        G2 += 1
    
    else:
        G3 += 1
 
print('AC x' +str(G0))
print('WA x' +str(G1))
print('TLE x'+str(G2))
print('RE x' +str(G3))
##B
N = int(input())
S = list(input() for i in range(N))
a=0
b=0
c=0
d=0
for i in S:
    if i =="AC":
        a +=1
    elif i =="WA":
        b +=1
    elif i =="TLE":
        c +=1
    elif i =="RE":
        d +=1
print("AC × "+ str(a))
print("WA × "+ str(b))
print("TLE × "+ str(c))
print("RE × "+ str(d))
import math
def main():
    judge_l = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
    l = int(input().rstrip())
    for i in range(l):
      judge = input().rstrip()
      judge_l[judge] += 1
    for key in judge_l.keys():
        print('{} × {}'.format(key, judge_l[key]))
    
if __name__ == "__main__":
    main()
N=int(input())
AC=0
WA=0
TLE=0
RE=0
for i in range(N):
    result=input()
    if result=="AC":
        AC+=1
    elif result == "WA":
        WA+=1
    elif result == "TLE":
        TLE += 1
    else:
        RE+=1

print("AC x"+str(AC))
print("WA x"+str(WA))
print("TLE x"+str(TLE))
print("RE x"+str(RE))
n = int(input())
s = list(input() for i in range(n))

ac = 0
wa = 0
tle = 0
re = 0
for i in range(n):
    if s[i] == "AC":
        ac+=1
    elif s[i] == "WA":
        wa += 1
    elif s[i] == "TLE":
        tle += 1
    else:
        re += 1

print("AC ×", str(ac))
print("WA ×",str(wa))
print("TLE ×",str(tle))
print("RE ×",str(re))
x=int(input())
b=0;
lst=[]
acs=0
was=0
res=0
tles=0
while(b<x):
    new=input()
    lst.append(new)
    b+=1
for c in lst:
    if(c=='AC'):
        acs+=1
    if(c=='WA'):
        was+=1
    if(c=='RE'):
        res+=1
    if(c=='TLE'):
        tles+=1
print('AC x '+str(acs))
print('WA x '+ str(was))
print('RE x ' +str(res))  
print('TLE x ' +str(tles))
N = int(input())
for s in range(N):
    s = list(input().split())
    
print('AC','x',s.count('AC'))
print('TLE','x',s.count('TLE'))
print('WJ','X',s.count('WJ'))
print('RE','X',s.count('RE'))
n=int(input())
ans=[0,0,0,0]
for i in range(n):
  a=str(input())
  if a=="AC":
    ans[0]+=1
  elif a=="WA":
    ans[1]+=1
  elif a=="TLE":
    ans[2]+=1
  else:
    ans[3]+=0

print("AC x "+str(ans[0]))
print("WA x "+str(ans[1]))
print("TLE x "+str(ans[2]))
print("RE x "+str(ans[3]))
N = int(input())
S = [input() for i in range(N)]
 
ac = 0
wa = 0
tle = 0
re = 0
for s in S:
  if s == 'AC': ac += 1
  elif s == 'WA': wa += 1
  elif s == 'TLE': tle += 1
  elif s == 'RE': re += 1

print('AC x ' + str(ac))
print('WA x ' + str(wa))
print('TLE x ' + str(tle))
print('RE × ' + str(re))
n=int(input())
c1,c2,c3,c4=0,0,0,0
for i in range(n):
  s=input()
  if(s=='AC'):
    c1+=1
  elif(s=='WA'):
    c2+=1
  elif(s=='TLE'):
    c3+=1
  else:
    c4+=1
print('AC X'+str(c1))
print('WA X'+str(c2))
print('TLE X'+str(c3))
print('RE X'+str(c4))
n = int(input())
ac = 0
wa = 0
tle = 0
re = 0

for i in range(n):
    s = input()
    print(s)
    if s == 'AC':
        ac += 1
    elif s == 'WA':
        wa += 1
    elif s == 'TLE':
        tle += 1
    else:
        re += 1

print('AC x ' + str(ac))
print('WA x ' + str(wa))
print('TLE x ' + str(tle))
print('RE x ' + str(re))
n=int(input())
ac=0
wa=0
tle=0
re=0
for i in range(n):
    tmp = input()
    if tmp == "AC":
        ac+=1
    elif tmp == "WA":
        wa+=1
    elif tmp == "TLE":
        tle+=1
    else:
        re+=1
print("AC ×",ac)
print("WA ×",wa)
print("TLE ×",tle)
print("RE ×",re)
N=int(input())

ac=0
wa=0
tle=0
re=0

S=[input() for i in range(N-1)]
for s in S:
    if s =='AC':
        ac=ac+1
    elif s == 'WA':
        wa = wa + 1
    elif s == 'TLE':
        tle = tle + 1
    else:
        re = re + 1

print("AC × ",ac)
print("WA × ",wa)
print("TLE × ",tle)
print("RE × ",re)
c = int(input())
j =  [0]*4
for i in range(c):
  i = input()
  if i == "AC":
    j[0] += 1
  elif i == "WA":
    j[1] += 1
  elif i == "TLE":
    j[2] += 1
  else:
    j[3] += 1
    
print("AC x "+ str(j[0]))
print("WA × "+ str(j[1]))
print("TLE × "+ str(j[2]))
print("RE × "+ str(j[3]))
N = int(input())

result = [input() for _ in range(N)]

C_AC,C_TLE,C_WA,C_RE = [0,0,0,0]

for i in result:
  if i == "AC":
    C_AC += 1
  elif i == "WA":
    C_WA += 1
  elif i == "TLE":
    C_TLE += 1
  elif i == "RE":
    C_RE += 1

print("AC x " + str(C_AC))
print("WA x " + str(C_WA))
print("TLE x " + str(C_TLE))
print("AC x " + str(C_RE))
t=int(input())
f=[]
for i in range(t):
    s=input()
    f.append(s)
print("AC"+' '+'*'+' '+str((f.count("AC"))))
print("WA"+' '+'*'+' '+str((f.count("WA"))))
print("TLE"+' '+'*'+' '+str((f.count("TLE"))))
print("RE"+' '+'*'+' '+str((f.count("RE"))))
data = {'AC':0,'WA':0,'TLE':0,'RE':0}
N = int(input())
for i in range(N):
  inputSTR = input()
  data[inputSTR] = data[inputSTR] + 1
  
for key,value in data.items():
  print(key + ' × ' + str(value))
N = int(input())
s = [input() for i in range(N)]
row = ['AC', 'WA', 'TLE', 'RE']
for r in row:
    count = 0
    for col in s:
        if col == r:
            count += 1
    print(r, '×', count, sep=' ')
x=int(input())
b=0;
lst=[]
acs=0
was=0
res=0
tles=0
while(b<x):
    new=input()
    lst.append(new)
    b+=1
for c in lst:
    if(c=='AC'):
        acs+=1
    if(c=='WA'):
        was+=1
    if(c=='RE'):
        res+=1
    if(c=='TLE'):
        tles+=1
print('AC X '+str(acs))
print('WA X '+ str(was))
print('RE X ' +str(res))  
print('TLE X ' +str(tles))
N = int(input())

result=[0,0,0,0]

for i in range(N):
  S=input()
  if S == "AC":
    result[0] += 1
  elif S == "WA":
    result[1] += 1
  elif S == "TLE":
    result[2] += 1
  else:
    result[3] += 1

print("AC × " + str(result[0]))
print("WA × " + str(result[1]))
print("TLE × " + str(result[2]))
print("RE × " + str(result[3]))
def main():
    N = int(input())
    di = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}

    for _ in range(N):
        di[input()] += 1

    for k, v in di.items():
        print(f"{k} × {v}")


if __name__ == "__main__":
    main()
n = int(input())
ac_c = 0
wa_c = 0
tle_c = 0
re_c = 0
for i in range(n):
    s = input()
    if s == "AC":
        ac_c += 1
    elif s == "WA":
        wa_c += 1
    elif s == "TLE":
        tle_c += 1
    else:
        re_c +=1
print("AC" + "x" + str(ac_c))
print("WA" +"x"+ str(wa_c))
print("TLE"+ "x"+ str(tle_c))
print("RE" + "x"+ str(re_c))
a,b,c,d=0,0,0,0
N=int(input())
S=[input() for _ in range(N)]
for i in range(N):
    if S[i]=='AC':
        a=a+1
    elif S[i]=='WA':
        b=b+1
    elif S[i]=='TLE':
        c=c+1
    elif S[i]=='RE':
        d=d+1
print('AC x　{}'.format(a))        
print('WA ×　{}'.format(b))       
print('TLE ×　{}'.format(c))       
print('RE ×　{}'.format(d))
N = int(input())
ans = [0,0,0,0]

for _ in range(N):
    a = input()
    if a == "AC":
        ans[0] += 1
    elif a == "WA":
        ans[1] += 1
    elif a == "TLE":
        ans[2] += 1
    else:
        ans[3] += 1

print("AC × "+ str(ans[0]))
print("WA × "+ str(ans[1]))
print("TLE × "+ str(ans[2]))
print("RE × "+ str(ans[3]))
n = int(input())
ac,wa,tle,re = 0,0,0,0
for i in range (n):
  s = input()
  if s == "AC":
    ac += 1
  elif s == "WA":
    wa += 1
  elif s =="TLE":
    tle += 1
  else:
    re += 1
print("AC × "+str(ac))
print("WA × "+str(wa))
print("TLE × "+str(tle))
print("RE × "+str(re))
N = int(input())
l = []
for i in range(N):
    i = input()
    l.append(i)

b = l.count("AC")
c = l.count("WA")
d = l.count("TLE")
e = l.count("RE")

print("AC ×",b)
print("WA ×",c)
print("TLE ×",d)
print("RE ×",e)
n = int(input())
s = [0] * n
for i in range(n):
    s[i] = input()
print('AC　x　' + str(s.count('AC')))
print('WA　x　' + str(s.count('WA')))
print('TLE　x　' + str(s.count('TLE')))
print('RE　x　' + str(s.count('RE')))
N = int(input())
a, w, t, r = 0, 0, 0, 0
for i in range(N):
    S = input()
    if S == 'AC':
        a += 1
    elif S == 'WA':
        w += 1
    elif S == 'TLE':
        t += 1
    else:
        r += 1
print('AC * ' + str(a))
print('WA * ' + str(w))
print('SLE * ' + str(t))
print('RE * ' + str(r))
N = int(input())
S = [input() for _ in range(N)] #N行に1文字入力したい
A = S.count("AC")
B = S.count("WA")
C = S.count("TLE")
D = S.count("RE")
print("AC"+"×" + str(A))
print("WA"+"×" + str(B))
print("TLE"+"×" + str(C))
print("RE"+"×" + str(D))
n = int(input())
s = [0]*n
for i in range(n):
    s[i] = input()

ac = s.count('AC')
wa = s.count('WA')
tle = s.count('TLE')
re = s.count('RE')
print('AC x',ac)
print('WA x',wa)
print('TLE x',tle)
print('Re x',re)
from collections import defaultdict
n = int(input())
d = defaultdict(int)
for i in range(n):
    d[input()] += 1
for i in ['AC', 'WA', 'TLE', 'RE']:
    print(i+' X '+str(d[i]))
N = int(input())
a, w, t, r = 0, 0, 0, 0
for i in range(N):
    S = input()
    if S == 'AC':
        a += 1
    elif S == 'WA':
        w += 1
    elif S == 'TLE':
        t += 1
    else:
        r += 1
print('AC × ' + str(a))
print('WA × ' + str(w))
print('SLE × ' + str(t))
print('RE × ' + str(r))