peterverebics/CodeNet_Python_118 huggingface dataset:
N = int(input())
s = [input() for i in range(N)]

res = {
    'AC' : 0,
    'TLE' : 0,
    'WA' : 0,
    'RE' : 0
}

for k in s:
    print(res[k])
    res[k] = res[k] + 1

for k, v in res.items():
    print(k + ' x ' + str(v))
n = int(input())

d = {"AC":0,"WA":0,"TLE":0,"RE":0}
for _ in range(n):
    st = input()
    d[st] += 1

for x,y in d.items():
    print(x,"×",y)
N = int(input())
S = list(str(input()) for _ in range(N))

print(S)

AC = 0
WA = 0
TLE = 0
RE = 0
for s in S:
    if s =='AX':
        AC +=1
    elif s == 'WA':
        WA +=1
    elif s == 'TLE':
        TLE += 1
    elif s == 'RE':
        RE  +=1

print('AC x {}'.format(AC))
print('WA x {}'.format(WA))
print('TLE x {}'.format(TLE))
print('RE x {}'.format(RE))
n = int(input())
s = [input() for i in range(n)]
AC = 0
WA = 0
TLE = 0
RE = 0
for j in range(n):
  if s[j] == 'AC':
    AC += 1
  elif s[j] == 'WA':
    WA += 1
  elif s[j] == '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
for i in range(n) :
    s=str(input())
    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)
import collections
n = int(input())
s = [input() for _ in range(n)]
c = collections.Counter(s)

r = list(c.items())

if 'RE' not in c.keys():
  r.append(('RE',0))
elif 'TLE' not in c.keys():
  r.append(('TLE',0))
elif 'WA' not in c.keys():
  r.append(('WA',0))
elif 'AC' not in c.keys():
  r.append(('AC',0))

for i in r:
  print(str(i[0]) + ' x ' + str(i[1]))
n = int(input())
inp = {}
for i in range(n):
    a = input()
    if inp.get(a) is None:
        inp[a] = 0
    inp[a] += 1
print(f"AC x {0 if inp.get('AC') is None else inp.get('AC')}")
print(f"WA x {0 if inp.get('WA') is None else inp.get('WA')}")
print(f"TLE x {0 if inp.get('TLE') is None else inp.get('TLE')}")
print(f"RE x {0 if inp.get('WA') is None else inp.get('WA')}")
N = int(input())
input_list = [input() for i in range(N)]
  
AC = 0
WA = 0
TLE = 0
RE = 0

for i in range(N):
  if input_list[i] == 'AC':
    AC += 1
  elif input_list[i] == 'WA':
    WA += 1
  elif input_list[i] == 'TLE':
    TLE += 1
  else:
    RE += 1
    
print('AC ×',AC)
print('WA ×',WA)
print('TLE ×',TLE)
print('RE ×',RE)
n = int(input())
list = [0,0,0,0]

for i in range(n):
  judge = input()
  if judge == 'AC':
    list[0] += 1
  elif judge == 'WA':
    list[1] += 1
  elif judge == 'TLE':
    list[2] += 1
  elif judge == 'RE':
    list[3] += 1
    
print( 'AC x {}'.format(list[0]) )
print( 'WA x {}'.format(list[1]) )
print( 'TLE x {}'.format(list[2]) )
print( 'RE x 0'.format(list[3]) )
N = int(input())
G0, G1, G2, G3 = 0, 0, 0, 0
for i in range(N):
    Si = input()
    if Si == 'AG':
        G0 += 1
 
    elif Si == 'WA':
        G1  += 1
 
    elif Si == 'TLE':
        G2 += 1
 
    else:
        G3 += 1
 
print('AG x ' + str(G0))
print('WA x ' + str(G1))
print('TLE x ' + str(G2))
print('RE x ' + str(G3))
def count_data(s):
    judge_list = ['AC', 'WA', 'TEL', 'RE']
    for judge in judge_list:
        ans = s.count(judge)
        print('{} x {}'.format(judge, ans))

n = int(input())
s = []
for i in range(n):
    s.append(input())
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',c1)
print('WA X',c2)
print('TLE X',c3)
print('RE X',c4)
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("AC × " + str(AC))
print("WA × " + str(WA))
print("TLE × " + str(TLE))
print("RE × " + str(RE))
N = int(input())
i = 1
cnt_ac = 0
cnt_wa = 0
cnt_tle = 0
cnt_re = 0

while i <= N:
  s = input()
  if s == 'AC':
    cnt_ac += 1
  elif s == 'WA':
    cnt_wa += 1
  elif s == 'TLE':
    cnt_tle += 1
  elif s == 'RE':
    cnt_re += 1
  i += 1

print('AC ×　' + str(cnt_ac))
print('WA ×　' + str(cnt_wa))
print('TLE ×　' + str(cnt_tle))
print('RE ×　' + str(cnt_re))
number = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for i in range(number):
    now = input()
    if now == "AC":
        ac += 1
    elif now == "WA":
        wa += 1
    elif tle == "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))
#B
n = int(input())
cnt_ac = 0
cnt_wa = 0
cnt_tle = 0
cnt_re = 0
for _ in range(n):
    s = input()
    if s == 'AC':
        cnt_ac += 1
    elif s == 'TLE':
        cnt_tle += 1
    elif s == 'WA':
        cnt_wa += 1
    else:
        cnt_re += 1

print('AC × {}'.format(cnt_ac))
print('WA × {}'.format(cnt_wa))
print('TLE × {}'.format(cnt_tle))
print('RE × {}'.format(cnt_re))
L = []
for i in range(int(input())):
  L.append(input())
print(L)
for j in ['AC','WA','TLE','RE']:
  print(j,'x',L.count(j))
n = int(input())
d = [input() for i in range(n)]
ac = 0
wa = 0
tle = 0
re = 0

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

print('AC x', ac)
print('WA x', wa)
print('TLE x', tle)
print('RA x', re)
n = int(input())
case = []
result = ["AC","WA","TLE","RE"]
for num in range(n):
  case.append(input())
for num in range(4):
  print("{} × {}".format(result[num],case.count(result[num])))
N=int(input())

list=[]
ac=0
wa=0
re=0
tlc=0

for i in range(N):
 list.append(input())

for i in range(N):
 if list[i]=="AC":
  ac+=1
 elif list[i]=="WA":
  wa+=1
 elif list[i]=="RE":
  re+=1
 else:
  tlc+=1

print("AC : "+str(ac))
print("WA : "+str(wa))
print("TLE : "+str(tlc))
print("RE : "+str(re))
n=int(input())
a=0
w=0
t=0
r=0
for i in range(n):
    s=str(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)
s = []
n = int(input())
for i in range(n):
    s.append(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())
s = []
for i in range(n):
    s.append(input())

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

print('AC x ' + str(ac))
print('WA × ' + str(wa))
print('TLE × ' + str(tle))
print('RE × ' + str(re))
n = int(input())

L = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}

for i in range(n):
    s = input()
    L[s] += 1

for l in L.keys():
    print(l, '×', L[l])
import sys
def Ii():return int(sys.stdin.readline())
def Mi():return map(int,sys.stdin.buffer.readline().split())
def Li():return list(map(int,sys.stdin.buffer.readline().split()))

n = Ii()
ac = 0
wa = 0
tle = 0
re = 0

for i in range(n):
  ip = input()
  if ip == 'AC':
    ac += 1
  elif ip == 'WA':
    wa += 1
  elif ip == 'TLE':
    tle += 1
  else:
    re += 1
    
print('AC','×',ac)
print('WA','×',wa)
print('TLE','×',tle)
print('RE','×',re)
N = int(input())
S = [input() for i in range(N)]
ac = 0
wa = 0
tle = 0
re = 0
for i in S:
  if i == "AC":
    ac += 1
  elif i == "WA":
    wa += 1
  elif i == "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())

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 = [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))
a = int(input())
s = []
for i in range(0,a) :
    d = input()
    s.append(d)
    

c1 = 0
c2 = 0
c3 = 0
c4 = 0

for i in range(0,len(s)) :
    if s[i] == "AC" :
        c1 += 1
    elif s[i] == "WA" :
        c2 += 1
    elif s[i] == "TLE" :
        c3 += 1
    elif s[i] == "RE" :
        c4 += 1
print("AC *",str(c1))
print("WA *",str(c2))
print("TLE *",str(c3))
print("RE *",str(c4))
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("AC x", ac)
print("WA x", wa)
print("TLE x", tle)
print("re x", re)
n =int(input())
list=[]
for i in range(n):
    s = input()
    list.append(s)
print('AC × '+str(list.count('AC')))
print('WA × '+str(list.count('WA')))
print('TLE × '+str(list.count('TLE')))
print('RE × '+str(list.count('RE')))
from collections import Counter
n = int(input().strip())
L = [input().strip() for _ in range(n)]


cnt=Counter(L)
for x in ["AC", "WA", "TLE", "RE"]:
    print(x+" ×　"+str(cnt[x]))
n = int(input())
s = []
for i in range(n):
    s.append(input())

result_set = ['AC','WA','TLE','RE']
for result in result_set:
    ans = result + '　×　' + str(s.count(result))
    print(ans)
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("AC × "+ str(ac))
print("WA × "+ str(wa))
print("TLE × " + str(tle))
print("RE × " + str(re))
N = int(input())
s = [input() for i in range(N)]

a = s.count('AC')
b = s.count('WA')
c = s.count('TLE')
d = s.count('RE')

print('AC ×',a)
print('WA ×',b)
print('TLE ×',c)
print('RE ×',d)
n = int(input())
s = [input() for i in range(n)]

i = 0
a = 0
t = 0
w = 0
r = 0

for i in range(n):
  if s[i] == "AC":
    a += 1
    i += 1
  elif s[i] == "TLE":
    t += 1
    i += 1
  elif s[i] == "WA":
    w += 1
    i += 1
  else:
    r += 1
    i += 1

print("""
AC × {0}
WA × {1}
TLE × {2}
RE × {3}
""". format(a, w, t, r))
import collections
n=int(input())
data=[]
for i in range(n):
    num=input()
    data.append(num)
data=collections.Counter(data)
print("AC × {}".format(data["AC"]))
print("WA × {}".format(data["WA"]))
print("TLE × {}".format(data["TLE"]))
print("RE × {}".format(data["RE"]))
N = int(input())
l = []
for i in range(N):
    l.append(input())
AC = l.count('AC')
WA = l.count('WA')
TLE = l.count('TLE')
RE = l.count('RE')
print("AC × {}".format(AC))
print("WA × {}".format(WA))
print("TLE × {}".format(TLE))
print("RE × {}".format(RE))
N = int(input())
C = [0]*4
for i in range(N):
    S = input()
    if S == 'AC':
        C[0] += 1
    elif S == 'WA':
        C[1] += 1
    elif S == 'TLE':
        C[2] += 1
    elif S == 'RE':
        C[3] += 1

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)]
A=str(a.count("AC"))
B=str(a.count("WA"))
C=str(a.count("TLE"))
D=str(a.count("RE"))
print("AC x"+ A)
print("WA x"+ B)
print("TLE x"+ C)
print("RE x"+ D)
word_list = str.split(input())
ac = word_list.count('AC')
wa = word_list.count('WA')
tle = word_list.count('TLE')
re = word_list.count('RE')

print('AC x ',ac)
print('WA x ',wa)
print('TLE x ',tle)
print('RE x ',re)
n = int(input())
j_dic = {"AC":0,"WA":0,"TLE":0,"RE":0}
for i in range(n):
    j_dic[input()]+=1

for k, v in j_dic.items():
    print(k,"×",v)
from collections import defaultdict

d=defaultdict(int)

for i 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("TLE x",d["TLE"])
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())

d = {"AC":0,"WA":0,"TLE":0,"RE":0}
for i in range(n):
  c = input()
  d[c]=d[c]+1 
print("AC X "+str(d["AC"]))
print("WA X "+str(d["WA"]))
print("TLE X "+str(d["TLE"]))
print("RE X "+str(d["RE"]), end='')
n = int(input())
s = [input() for i in range(n)]

a = s.count("AC")
w = s.count("WA")
t = s.count("TLE")
r = s.count("RE")

print(f'AC × {a}')
print(f'WA × {w}')
print(f'TLE × {t}')
print(f'RE × {r}')
N = int(input())

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

for i in range(N):
  pass



print('AC x %d'%ac)
print('WA x %d'%wa)
print('TLE x %d'%tle)
print('RE x %d'%re)
N = int(input())
for s in range(1,N+1):
  s = list(input().split())
  print(s)
  break
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())
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("WA x",ac)
print("WA x", wa)
print("TLE x", tle)
print("RE x", re)
n = int(input())
a = 0
b = 0
c = 0
d = 0

for i in range(n):
  S = str(input())
  if S == 'AC':
    a += 1
  if S == 'WA':
    b += 1
  if S == 'TLE':
    c += 1
  if S == 'RE':
    d += 1
print('AC × ',a)
print('WA × ',b)
print('TLE × ',c)
print('RE × ',d)
n=int(input())
a,b,c,d=0,0,0,0
for i in range(n):
    s=input()
    if s=='AC':
        a=a+1
    elif s=='WA':
        b=b+1
    elif s=='TLE':
        c=c+1
    else:
        d=d+1
print('AC','X',a)
print('WA','X',b)
print('TLE','X',c)
print('RE','X',d)
n = int(input())
s = [input()for i in range(n)]
c0 = 0
c1 = 0
c2 = 0
c3 = 0
for i in range(n):
    if s[i] == 'AC':
        c0 += 1
    elif s[i] == 'WA':
        c1 += 1
    elif s[i] == 'TLE':
        c2 += 1
    else:
        c3 += 1
print(f'AC × {c0}\nWA × {c1}\nTLE × {c2}\nRE × {c3}')
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',a)        
print('WA ×',b)    
print('TLE ×',c)       
print('RE ×',d)
n=int(input())
d={'AC':0,"WA":0,'TLE':0,'RE':0}
for i in range(n):
    s=str(input())
    if(s=='AC'):
        d['AC']=d['AC']+1
    elif(s=='WA'):
        d['WA']=d['WA']+1
    elif(s=='RE'):
        d['RE']=d['RE']+1
    elif(s=='TLE'):
        d['TLE']=d['TLE']+1
print('AC'+"x"+str(d['AC']))
print('WA'+"x"+str(d['WA']))
print('TLE'+"x"+str(d['TLE']))
print('RE'+"x"+str(d['RE']))
import math
import collections


def main():
  N = int(input())
  S = [input() for _ in range(N)]
  
  A = collections.Counter(S)
  print(A)
  
  print('AC × ' + str(A['AC']))
  print('WA × ' + str(A['WA']))
  print('TLE × ' + str(A['TLE']))
  print('RE × ' + str(A['RE']))
  
  
  
main()
N = int(input())
list1=[]
for i in range(N):
  a = input()
  list1.append(a)  
  
a = list1.count('AC')
b = list1.count('WA')
c = list1.count('TLE')
d = list1.count('RE')
list2 = [a,b,c,d]
print('AC x'+str(a))
print('WA x'+str(b))
print('TLE x'+str(c))
print('RE x'+str(d))
n = int(input())
str_list = [input() for _ in range(n)]


a=0
b=0
c=0                
d=0                
                
for i in range(1, n):
    if str_list[i] == 'AC':
    	a += 1
    elif str_list[i] == 'WA':
    	b += 1
    elif str_list[i] == 'TLE':
    	c +=1
    else :
    	d +=1

print('AC x'+ str(a))
print('WA x'+ str(b))
print('TLE x'+ str(c))
print('RE x'+ str(d))
N = int(input())
A = 0
W = 0
T = 0
R = 0
for i in range(1, N+1):
  s = str(input())
  if s == "AC":
    A = A + 1
  elif s == "WA":
    W = W + 1
  elif s == "TLE":
    T = T + 1
  elif s == "RE":
    R = R + 1
  print("AC x " + str(A))
  print("WA x " + str(W))
  print("TLE x " + str(T))
  print("RE x " + str(R))
n = int(input())
c0 = 0
c1 = 0
c2 = 0
c3 = 0

#縦に文字列を複数入力　＆　操作
for i in range(n):
    s = input()
    if s == "AC":
        c0 += 1
    if s == "WA":
        c1 += 1
    if s == "TLE":
        c2 += 1
    if s == "RE":
        c3 += 1    
        
print("AC " + "× " + str(c0))
print("WA " + "× " + str(c1))
print("TLE " + "× " + str(c2))
print("RE " + "× " + str(c3))
from collections import Counter

N,S = int(input()),[]
for _ in range(N):
	S.append(input())
c = Counter(S)

print('AC × ' + str(c['AC']))
print('WA × ' + str(c['WA']))
print('TLE × ' + str(c['TLE']))
print('RE × ' + str(c['RE']))
n = int(input())
ac, wa, tle, re = 0, 0, 0, 0

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

print("AC ×", ac)
print("WA ×", wa)
print("TLE ×", tle)
print("RE ×", re)
import math
import sys

n = int(input())
e = math.pow(10,5)

if (n<1)or(e<n):
    sys.exit(0)

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
    elif s=="RE":
        re += 1
    else:
        sys.exit(0)

print("AC ×", str(ac), "\nWA ×", str(wa), "\nTLE ×", str(tle), "\nRE ×", str(re))
n=int(input())
dic={}
dic["AC"]=0
dic["WA"]=0
dic["TLE"]=0
dic["RE"]=0
for x in range(n):
  a=input()
  dic[a]=dic[a]+1
print("AC",x,dic["AC"])
print("WA",x,dic["WA"])
print("TLE",x,dic["TLE"])
print("RE",x,dic["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,wa,tle,re)
print('AC × {}'.format(ac))
print('WA × {}'.format(wa))
print('TLE × {}'.format(tle))
print('RE × {}'.format(re))
N = int(input())
S = [input() for i 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")))
def main():
    import collections
    n = int(input())
    mylist = []
    for i in range(1, n+1):
        s = input()
        mylist.append(s)
    c = collections.Counter(mylist)
    print('AC × ' + str(c['AC']))
    print('WA × ' + str(c['WA']))
    print('TLE × ' + str(c['TLE']))
    print('RE × ' + str(c['RE']))
if __name__ == "__main__":
    main()
N = int(input())
S = list(map(str, input().split()))
a = S.count("AC")
w = S.count("WA")
t = S.count("TLE")
r = S.count("RE")
print("AC x" + " " + str(a))
print("WA x" + " " + str(w))
print("TLE x" + " " + str(t))
print("RE x" + " " + str(r))
from collections import Counter

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

s = Counter(S)

print('AC × ',end='')
print(s['AC'])
print('WA × ', end='')
print(s['WA'])
print('TLE × ',end='')
print(s['TLE'])
print('RE × ', end='')
print(s['RE'])
n = int(input())
searchWord = ['AC','WA','TLE','RE']
wordCountDict = {letter : 0 for letter in searchWord}
receiveWord = []
for i in range(n):
    word = input()
    receiveWord.append(word)

for letter in receiveWord:
    if letter in searchWord:
        wordCountDict[letter] += 1
for key, value in wordCountDict.items():
    print(f'{key} × {value}')
N = int(input())

AC_n = 0
WA_n = 0
TLE_n = 0
RE_n = 0

for i in range(N):
    ans = input()
    if (ans == "AC"):
        AC_n += 1
    elif(ans == "WA"):
        WA_n += 1
    elif(ans == "TLE"):
        TLE_n += 1
    elif(ans == "RE"):
        RE_n += 1

print(f'AC × {AC_n}')
print(f'WA × {WA_n}')
print(f'TLE × {TLE_n}')
print(f'RE × {RE_n}')
N = int(input())
list = []
for i in range(N):
    list.append(input())
C0 = 0
C1 = 0
C2 = 0
C3 = 0
for i in range(N):
    if list[i] == "AC":
        C0 += 1
    elif list[i] == "WA":
        C1 += 1
    elif list[i] == "TLE":
        C2 += 1
    elif list[i] == "RE":
        C3 += 1
        
print("AC * ", C0)
print("WA * ", C1)
print("TLE * ", C2)
print("RE * ", C3)
N=int(input())
S=[input() for i in range(N)]
ac_count=0
wa_count=0
tle_count=0
re_count=0
for i in range(len(S)):
    if S[i]=="AC":
        ac_count+=1
    if S[i]=="WA":
        wa_count+=1
    if S[i]=="TLE":
        tle_count+=1
    if S[i]=="RE":
        re_count+=1
print("AC ×",ac_count)
print("WA ×",wa_count)
print("TLE ×",tle_count)
print("RE ×",re_count)
N= int(input())
s = [input() for i in range(N)]
print("AC x " ,s.count("AC"))
print("WE x ",s.count("WE"))
print("TLE x ",s.count("TLE"))
print("RE x ",s.count("RE"))
n = int(input())
a = [0]*4

for i in range(n):
    s = input()
    if s == "AC":
        a[0] += 1
    elif s == "WA":
        a[1] += 1
    elif s == "TLE":
        a[2] += 1
    else:
        a[3] += 1
        
print("AC x "*a[0])
print("WA x "*a[1])
print("TLE x "*a[2])
print("RE x "*a[3])
counto = []
for _ in range(int(input())):
	s = input()
	counto.append(s)
print("AC"+" x "+str(counto.count("AC")))
print("WC"+" x "+str(counto.count("WA")))
print("TLE"+" x "+str(counto.count("TLE")))
print("RE"+" x "+str(counto.count("RE")))
n = int(input())
word_dict = {}
for _ in range(n):
  word = str(input())
  if word in word_dict:
    word_dict[word] += 1
  else:
    word_dict[word] = 1
for k, v in word_dict.items():
  print(k, 'x', v)
n = int(input())

c0 = 0
c1 = 0
c2 = 0
c3 = 0

for i in range(n):
    a = input()
    if(a == 'AC'):
        c0 += 1
    elif(a == 'WA'):
        c1 += 1
    elif(a == 'TLE'):
        c2 += 1
    elif(a == 'RE'):
        c3 += 1

print('AC ×' + str(c0))
print('WA ×' + str(c1))
print('TLE ×' + str(c2))
print('RE ×' + str(c3))
n = int(input())
s = [input() for i in range(n)]
print('AC * %d' % (s.count('AC')))
print('WA * %d' % (s.count('WA')))
print('TLE * %d' % (s.count('TLE')))
print('RE * %d' % (s.count('RE')))
n = int(input())
ac = 0
wa = 0
tel = 0
re = 0
for y in range(0,n):
  x = input()
  if x[0] == 'A':
    ac += 1
  elif x[0] == 'W':
    wa += 1
  elif x[0] == 'T':
    tel += 1
  else:
    re += 1
print("AC x " + str(ac))
print("WA x " + str(wa))
print("TEL x " + str(tel))
print("RE x " + str(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
  elif s=="RE":
    r+=1

print("AC × ",a)
print("WA × ",w)
print("TLE × ",t)
print("RE × ",r)
n=int(input())
s=list(input().split())
print(s.count('AC'))
print(s.count('WA'))
print(s.count('TLE'))
print(s.count('RE'))
n=int(input())


ac=0
wa=0
tle=0
re=0
for i in range(n) :
    s=str(input())
    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)
N = int(input())
S = list()
for i in range(N):
    S.append(input())

for k in ['AC', 'TLE', 'WA', 'RE']:
    print('{0} x {1}'.format(k, S.count(k)))
ans = [0 for i in range (4)]
num = int(input())
for i in range (num):
    inp = input()
    if inp == 'AC':
        ans[0] += 1
    elif inp =='WA':
        ans[1] +=1
    elif inp == 'TLE':
        ans[2] += 1
    elif inp == 'RE':
        ans[3] += 3
print ('AC x {}'.format(ans[0]))
print ('WA x {}'.format(ans[1]))
print ('TLE x {}'.format(ans[2]))
print ('RE x {}'.format(ans[3]))
n=int(input())
a  = []
for i in range(n):
    s=str(input())
    a.append(s)
print(("AC * ")+str(a.count("AC")))
print(("WA * ")+str(a.count("WA")))
print(("TLE * ")+str(a.count("TLE")))
print(("RA * ")+str(a.count("RA")))
n = int(input())
s = []
for _ in range(n):
	s.append(str(input()))
ac = 0
wa = 0
tle = 0
re = 0
for i in s:
	if i == 'AC':
		ac += 1
	elif i == 'WA':
		wa += 1
	elif i == 'TLE':
		tle += 1
	elif i == 'RE':
		re += 1
#re = n - ac - wa - tle
print('AC × {}'.format(str(ac)))
print('WA × {}'.format(str(wa)))
print('TLE × {}'.format(str(tle)))
print('RE × {}'.format(str(re)))
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}")
print(f"WA × {wa}")
print(f"TLE × {tle}")
print(f"RE × {re}")
N=int(input())
S=[input() for _ in range(1,N+1)]
C0=0
C1=0
C2=0
C3=0
for s in S:
    if s=='AC':
        C0+=1
    elif s=='WA':
        C1+=1
    elif s=='TLE':
        C2+=1
    elif s=='RE':
        C3+=1
print('AC x'+str(C0))
print('WA x'+str(C1))
print('TLE x'+str(C2))
print('RE x'+str(C3))
n = int(input())
a = 0
b = 0
c = 0
d = 0
 
for i in range(n):
  S = str(input())
  if S == 'AC':
    a += 1
  if S == 'WA':
    b += 1
  if S == 'TLE':
    c += 1
  if S == 'RE':
    d += 1
print('AC x'+str(a))
print('WA x'+str(b))
print('TLE x'+str(c))
print('RE x'+str(d))