peterverebics/CodeNet_Python_118 huggingface dataset:
n = int(input())
s_i = []
for i in range(n):
  s = input()
  s_i.append(s)

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

print("AC × {0}".format(ac))
print("WA × {0}".format(wa))
print("TLE × {0}".format(tle))
print("RE × {0}".format(re))
N = int(input())
X = []
for i in range(N):
    X.append(input())

AC = 0
WA = 0
TLE = 0
RE = 0

for s in X:
    print(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 x ' + str(RE))
n=int(input())
a=w=r=t=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 * "+str(a) )
print("WA * "+str(w))
print("TLE * "+str(t))
print("RA * "+str(r))
n = int(input())
s = [input() for _ in range(n)]
l = ["AC","WA","TLE","RE"]
for i in range(4):  print(l[i],"X",s.count(l[i]))
N=int(input())
print(N+N*N+N*N*N)
n = int(input())
s = [input() for i in range(n)]

nac = 0
nwa = 0
ntle = 0
nre = 0

print(s)
for i in s:
    if i == 'AC':
        nac += 1
    if i == 'WA':
        nwa += 1
    if i == 'TLE':
        ntle += 1
    if i == 'RE':
        nre += 1

print("AC × ", nac)
print("WA × ", nwa)
print("TLE × ", ntle)
print("RE × ", nre)
a=int(input())
cAC=0
cWA=0
cTLE=0
cRE=0
for i in range(a):
    b=input()
    if b=="AC":
        cAC+=1
    elif b=="WA":
        cWA=1
    elif b=="TLE":
        cTLE+=1
    elif b=="RE":
        cRE+=1
print("AC × {}".format(cAC))
print("WA × {}".format(cWA))
print("TLE × {}".format(cTLE))
print("RE × {}".format(cRE))
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 × '+str(a))
print('WA × '+str(b))
print('TLE × '+str(c))
print('RE × '+str(d))
import sys
from collections import Counter
input()
ct=Counter(sys.stdin)
for k,v in ct.items():
    print(k.strip(),'x',v)
N = int(input())
n = list(map(str, input().split()))
a= 0
b=0
c=0
d=0
for i in n:
    if i == "AC":
        a = a+1
    elif i=="WA":
        b = b+1
    elif i=="TLE":
        c = c+1
    elif i== "RE":
        d = d+1
print("AC x", a)
print("WA x", b)
print("TLE x", c)
print("RE x", d)
x=int(input())
a=0
w=0
t=0
r=0
for i in range(x):
    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())

cnt_AC = 0
cnt_WA = 0
cnt_TLE = 0
cnt_RE = 0

for n in range(N):
    tmp = input()
    if(tmp == 'AC'):
        cnt_AC += 1
    elif(tmp == 'WA'):
        cnt_WA += 1
    elif(tmp == 'TLE'):
        cnt_TLE += 1
    elif(tmp == 'RE'):
        cnt_RE += 1

print('AC × ' + str(cnt_AC))
print('WA × ' + str(cnt_WA))
print('TLE × ' + str(cnt_TLE))
print('RE × ' + str(cnt_RE))
n=int(input())
l=[input() for i in range(n)]

print('AC ×',l.count('AC'))
print('WA ×',l.count('WA'))
print('TLE ×',l.count('TLE'))
print('RE ×',l.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
  elif S == 'RE':
    re += 1
  else:
    break

print('AC ×',ac)
print('WA ×',ac)
print('TLE ×',ac)
print('RE ×',ac)
N = int(input())
d = {}
for i in range(N):
  x = input()
  if x in d.keys():
    d[x]+=1 
  else:
    d[x] = 1
for j in d.keys():
  print(j + " " + "x" + " " + str(d[j]))
  print("\n")
# Judge Status Summary

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

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


for j in range(N):
    if stringList[j] == 'AC':
        c0 = c0 + 1
    if stringList[j] == 'WA':
        c1 = c1 + 1
    if stringList[j] == 'TLE':
        c2 = c2 + 1
    if stringList[j] == 'RE':
        c3 = c3 + 1

print('AC × '+ str(c0))
print('WA × '+ str(c1))
print('TLE × '+str(c2))
print('RE × '+ str(c3))
n = int(input())
Sn = [input()for i in range(1,n+1)]

C0 = Sn.count('AC')
C1 = Sn.count('WA')
C2 = Sn.count('TLE')
C3 = Sn.count('RE')

print('AC × '+str(C0)+'\n')
print('WA × '+str(C1)+'\n')
print('TLE × '+str(C2)+'\n')
print('RE × '+str(C3)+'\n')
import sys
a = []
for l in sys.stdin:
    a.append(l)
N = a[0]
count = [0]*4
for a in a[1:]:
  if a == "AC":
    count[0] += 1
  if a == "WA":
    count[1] += 1
  if a == "TLE":
    count[2] += 1
  if a == "RE":
    count[3] += 1
print("AC"," ","×"," ",count[0],"\n")
print("WA"," ","×"," ",count[1],"\n")
print("TLE"," ","×"," ",count[2],"\n")
print("RE"," ","×"," ",count[3],"\n")
n=int(input())

s=[]
for i in range(n):
    a=input()
    s.append(a)
    
for j in ['AC', 'WA', 'TLE', 'RE']:
    print('{0} × {1}'.format(j,s.count(j)))
N=int(input())
w =0
x =0
y =0
z =0

for i in range(N):
    s =input()
    if s =='AC':
        w +=1
    elif s == 'WA':
        x +=1
    elif s == 'TLE':
        y +=1
    elif s == 'RE':
        z +=1

print ('AC × '+str(w))
print ('WA × '+str(x))
print ('TLe × '+str(y))
print ('RE × '+str(z))
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 =='AC':
        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())
a = 0
b = 0
c = 0
d = 0
for i in range(n):
    s = str(input())
    if s == 'AC' :
        a += 1
    elif s == 'WA':
        b += 1
    elif s == 'TLE':
        c += 1
    else:
        d += 1
print('AC × {}'.format(a))
print('WA × {}'.format(b))
print('TLE × {}'.format(c))
print('RE × {}'.format(d))
import math
import sys

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

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

i = 1
ac = 0
wa = 0
tle = 0
re = 0
while i<=n:
    s = input()
    if s=="AC":
        ac += 1
    elif s=="WA":
        wa += 1
    elif s=="TLE":
        tle += 1
    elif s=="RE":
        re += 1
    i+=1

print("AC ×", ac, "\nWA ×", wa, "\nTLE ×", tle, "\nRE ×", re)
import collections
AC=0
WA=0
TLE=0
RE=0
N=int(input())
S=[]
for i in range(N):
  S.append(input())
count=collections.Counter(S)
print("AC x　{}".format(count["AC"]))
print("WA x　{}".format(count["WA"]))
print("TLE x　{}".format(count["TLE"]))
print("RE x　{}".format(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 += 1
    if s == 'WA':
        wa += 1
    if s == 'TLE':
        tle += 1
    if s == 'RE':
        re += 1

print('AC x',ac)
print('WA x',wa)
print('TLE x',tle)
print('RE x',ac)
N = int(input())
C = [ 0 for i in range(4) ]
s2num = {"AC":0, "WA":1, "TLE":2, "RE":3}
num2s = {0:"AC", 1:"WA", 2:"TLE", 3:"RE"}
# read
for i in range(N):
    num = s2num[ input() ]
    C[num] += 1
    #print(num)
# print
for i in range(4):
    print("{} × {}".format( num2s[i], C[i] ))
n = int(input())

s = [input() for _ 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))
#

import sys
input=sys.stdin.readline

def main():
    N=int(input())
    r=["AC","WA","TLE","RE"]
    c=[0]*4
    for i in range(N):
        s=input().strip("\n")
        c[r.index(s)]+=1
    for i in range(4):
        print(r[i],"×",c[i])
    
    
    
if __name__=="__main__":
    main()
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)
def judge_status_summary():
    N = int(input())
    res = {"AC":0,"WA":0,"TLE":0,"RE":0}
    for i in range(N):
        res[input()] += 1
    
    for k in res:
        print("{} X {}".format(k,res[k]))
        
judge_status_summary()
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 ×　" + str(cnt_ac))
print("WA ×　" + str(cnt_wa))
print("TLE ×　" + str(cnt_tle))
print("RE ×　" + str(cnt_re))
N = int(input())
S = []
for _ in range(N):
    S.append(input())

AC = []
WA = []
TLE = []
RE = []

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

for i in A:
    if i == "AC":
        AC += 1
    elif i == "WA":
        WA += 1
    elif i == "TLE":
        TLE += 1
    else :
        RE += 1

print("AC ×",AC)
print("WA x",WA)
print("TLE x",TLE)
print("RE x",RE)
N = int(input())
S = []
for _ in range(N): 
    S.append(input())
AC = S.count('AC')
WA = S.count('WA')
TLE = S.count('TLE')
RE = S.count('RE')
print('AC ×', AC)
print('WA ×', WA)
print('TLE ×', TLE)
print('RE ×', RE)
n = int(input())

d = {}
lst = ['AC', 'WA', 'TLE', 'RE']
for i in range(n):
    s = input()
    if s in d:
        d[s] += 1
    else:
        d[s] = 1

for key, val in d.items():
    if key in lst:
        print(key, 'x', val)
        lst.remove(key)
for i in lst:
    print(i, 'x 0')
n = int(input())

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

for i in range(n):
    b = input()
    if b == "AC":
        a += 1
    if b == "WA":
        w += 1
    if b == "TLE":
        t += 1
    if b == "RE":
        r += 1
print("AC x", a)
print("WA x", w)
print("TLE x", t)
print("RE2 x", r)
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
    elif a == 'RE':
        ans[3] += 1
print('AC ×',ans[0])
print('WA ×',ans[1])
print('TLE ×',ans[2])
print('RE ×',ans[3])
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}')
def judge_status_summary():
    # 入力
    N = int(input())
    S = [input() for _ in range(N)]
    # 判別処理 
    # リスト初期化
    result_list = ['AC', 'WA', 'TLE', 'RE']
    count_list = [0, 0, 0, 0]
    # 集計
    for i in range(N):
        one_count_up_inxex = result_list.index(S[i])
        count_list[one_count_up_inxex] += 1
    # 表示
    for i in range(4):
        print(result_list[i], '×', count_list[i])

judge_status_summary()
N = int(input())
judge = []
for i in range(N):
    judge.append(input())

counter = [0, 0, 0, 0]
for i in range(N):
    if judge[i] == "AC":
        counter[0] += 1
    if judge[i] == "WA":
        counter[1] += 1
    if judge[i] == "TLE":
        counter[2] += 1
    if judge[i] == "RE":
        counter[3] += 1

print("AC × " + str(counter[0]))
print("WA × " + str(counter[1]))
print("TLE × " + str(counter[2]))
print("RE × " + str(counter[3]))
n = int(input())  
str_list = [input() for _ in range(n)]
AC = 0
WA = 0
TLE = 0
RE = 0

for i in range(n):
  if str_list[i] == 'AC':
    AC +=1
  elif str_list[i] == 'WA':
    WA += 1
  elif str_list[i] == 'TLE':
    TLE += 1
  elif str_list[i] == 'RE':
    RE += 1
print('AC ×', AC)
print('WA ×', WA)
print('TLE ×', TLE)
print('RE ×', RE)
# -*- coding: utf-8 -*-
a = int(input())

AC = 0
WA = 0
TLE = 0
RE = 0

for i in range(a):
    s = input()
    if s == "AC":
        AC = AC + 1
        continue
    if s == "AC":
        AC = AC + 1
        continue
    if s == "TLE":
        AC = AC + 1
        continue
    if s == "RE":
        AC = AC + 1
        continue


print("AC x {}".format(AC))
print("WA x {}".format(AC))
print("TLE x {}".format(AC))
print("RE x {}".format(AC))
n = int(input())
str_list = [input() for _ in range(n)]


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

i=0
                
for i in range(0, 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))
#import sys
#import numpy as np
import math
#from fractions import Fraction
import itertools
from collections import deque
from collections import Counter
#import heapq
#from fractions  import gcd
#input=sys.stdin.readline
import bisect
n=int(input())
d=[0]*4
for i in range(n):
    s=input()
    if s=="AC":
        d[0]+=1
    elif s=="WA":
        d[1]+=1
    elif s=="TLE":
        d[2]+=1
    else:
        d[3]+=1
print("AC ×",d[0])
print("WA ×",d[1])
print("TLE ×",d[2])
print("RE ×",d[3])
N = int(input())
S = [input() for i in range(N)]

for item in ['AC', 'WA', 'TLE', 'RE']:
    print("{} X {}".format(item, S.count(item)))
na=0
nw=0
nt=0
nr=0
i = int(input())
for n in range(i):
    a=input()
    if a=="AC":
        na= na +1
    elif a=="WA":
        nw= nw+1
    elif a=="TLE":
        nt=nt+1
    else:
        nr=nr+1
print('AC × %d'%na)
print('WA × %d'%nw)
print('TLE × %d'%nt)
print('RE × %d'%nr)
N =int(input())
a = []
for i in range(N):
	a.append(input())

count_AC = 0
count_WA = 0
count_TLE = 0
count_RE = 0

for i in range(N):
	if a[i] == 'AC':
		count_AC += 1
	if a[i] == 'WA':
		count_WA += 1
	if a[i] == 'TLE':
		count_TLE += 1
	if a[i] == 'RE':
		count_RE += 1

print('AC × ', end='')
print(count_AC)
print('WA × ', end='')
print(count_WA)
print('TLE × ', end='')
print(count_TLE)
print('RE × ', end='')
print(count_RE)
N = int(input())
con = [input() for i in range(N)]
C = [0,0,0,0]
for s in con:
    if(s == "AC"):
        C[0] +=1
    if(s == "WA"):
        C[1] +=1
    if(s == "TLE"):
        C[2] +=1
    if(s == "RE"):
        C[3] +=1
print("AC × ",C[0])
print("WA × ",C[1])
print("TLE × ",C[2])
print("RE × ",C[3])
string1 = input()
string2 = "AC" 
string3 = string1.count(string2)
print("AC x {}".format(string3))
string4 = "WA" 
string5 = string1.count(string4)
print("WA x {}".format(string5))
string6 = "TLE" 
string7 = string1.count(string6)
print("TLE x {}".format(string7))
string8 = "RE" 
string9 = string1.count(string8)
print("RE x {}".format(string9))
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
    elif s == "TLE":
        re += 1

print("AC x {}".format(ac))
print("WA x {}".format(wa))
print("TLE x {}".format(tle))
print("RE x {}".format(re))
#!/usr/bin/env python
# coding: utf-8

# In[2]:


n = int(input())

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

for i in range(n):
    s = input()
    L[s] += 1
for i in L:
    print('{} × {}'.format(i, L[i]))
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] += 1
    print(ans)
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, w, t, r = 0, 0, 0, 0
for _ 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('TLE × ' + str(t))
print('RE × ' + str(r))
#! python3
# coding:utf-8

n = int(input())

s = [input() for _ in range(n)]
print(s)

c0=0
c1=0
c2=0
c3=0
for i in s:
    if i == "AC":
        c0+=1
    elif i == "WA":
        c1+=1
    elif i == "TLE":
        c2+=1
    else:
        c3+=1

print("AC x",c0)
print("WA x",c1)
print("TLE x",c2)
print("RE x",c3)
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 + {}'.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 *",s.count('AC'))
print("WA *",s.count('WA'))
print("TLE *",s.count('TLE'))
print("RE  *",s.count('RE'))
import math
import sys

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

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

i = 1
ac = 0
wa = 0
tle = 0
re = 0
while i<=n:
    s = input()
    if s=='AC':
        ac += 1
    elif s=='WA':
        wa += 1
    elif s=='TLE':
        tle += 1
    elif s=='RE':
        re += 1
    i+=1

print("AC ×", ac, "\nWA ×", wa, "\nTLE ×", tle, "\nRE ×", re)
t=int(input())
ac=0
wa=0
tle=0
re=0
for _ in range(t):
  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)
l = []
for i in range(int(input())):
   l.append(input())
ac = 0
wa = 0
tle = 0
re = 0
for i in l:
    if i == "AC":
        ac+=1
    if i == "TLE":
        tle+=1
    if i == "WA":
        wa+=1
    if i == "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())

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

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

for i in L:
    print(i, '×', L[i])
import collections
N = int(input())
S = []
for _ in range(N):
  S.append(input())

counter = collections.Counter(S)
AC = counter['AC']
WA = counter['WA']
TLE = counter['TLE']
RE = counter['RE']

print("AC × {}".format(AC))
print("WA × {}".format(WA))
print("TLE × {}".format(TLE))
print("RE × {}".format(RE))
n = int(input())
case = ["AC", "WA", "TLE", "RE"]
ac=0;wa=0;tle=0;re=0;
ss = []
for _ in range(n):
        ss.append(input())
for i in ss:
    if i == "AC":
        ac += 1
    elif i == "WA":
        wa += 1
    elif i == "TLE":
        tle += 1
    else:
        re += 1
print(f"{case[0]} × {ac}")
print(f"{case[1]} × {wa}")
print(f"{case[2]} × {tle}")
print(f"{case[3]} × {re}")
N = int(input())

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

for i in range(1,N+1):
  S = str(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())
judge = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for i in range(N):
  judge[input()] += 1
print('AC X ' + str(judge['AC']))
print('WA X ' + str(judge['WA']))
print('TLE X ' + str(judge['TLE']))
print('RE X ' + str(judge['RE']))
n=int(input())
li=[]
for i in range(n):
    s=input()
    li.append(s)

ac=0
wa=0
tle=0
re=0
for i in li:
    if i=="AC":
        ac+=1
    elif i =="TLE":
        tle+=1
    elif i=="WA":
        wa+=1
    else:
        re+=1
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(N)
#print(S)

count = [0, 0, 0, 0]

for s in S:
  if s in "AC":
    count[0] += 1
  elif s in "WA" :
    count[1] += 1
  elif s in "TLE" :
    count[2] += 1
  elif s in "RE":
    count[3] += 1
    
print("AC x " + str(count[0]))
print("WA x " + str(count[1]))
print("TL x " + str(count[2]))
print("RE x " + str(count[3]))
n = int(input())
AC=0
WA=0
TLE=0
RE=0
list1 = []
for _ in range(n):
    s = input()
    list1.append(s)

for i in list1:
    if(i=='AC'):    AC+=1
    elif(i=='WA'):  WA+=1
    elif(i=="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())
a = 0
b = 0
c = 0
d = 0
for _ in range(n):
  i = input()
  if i == 'AC':
    a+=1
  if i == 'WA':
    b +=1
  if i == 'TLE':
    c +=1
  if i == 'RE':
    d+=1
print('AC × '+str(a))
print('WA × '+str(b))
print('TLE × '+str(c))
print('RE × '+str(d))
loop = int(input())
ac = 0
wa = 0
tle =0
re = 0

for _ in range(loop):
  judge = input()
  if judge == 'AC':
    ac += 1
  elif judge == 'WA':
    wa += 1
  elif judge == 'TLE':
  	tle += 1
  elif judge == 'RE':
    re += 1
    
print('AC × {}'.format(ac))
print('WA × {}'.format(wa))
print('TLE × {}'.format(tle))
print('RE × {}'.format(re))
n = int(input())
s = list(input().split())
  
print("AC x ",s.count("AC"))
print("WA x ",s.count("WA"))
print("TLE x ",s.count("TLE"))
print("RE x ",s.count("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 x " + str(a))
print("WA x " + str(w))
print("TLE x " + str(a))
print("RE x " + str(w))
N = int(input())
lis = [0,0,0,0]
for i in range(N):
    s = input()
    if s == 'AC':
        lis[0] += 1
    elif s == 'WA':
        lis[1] += 1
    elif s == '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]))
a = int(input())
list1 = []
dict1 = {}
for x in range(a):
    b = input()
    list1.append(b)

for x in list1:
    if x not in dict1:
        dict1[x] = 1
    else:
        dict1[x] += 1

for x in dict1:
    print(f'{x} x {dict1[x]}')
n = int(input())
a=b=c=d=0
for i in range(n):
  e = input()
  if e == 'AC':
    a+=1
  elif e == 'WA':
    b +=1
  elif e == 'TLE':
    c+=1
  else:
    d+=1

print('AC ×'+str(a)+'\n'+'WA ×' +str(b) + '\n'
      +'TLE ×'+str(c) +'\n' + 'RE ×'+str(d))
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 ×',C)
print('WA ×',D)
print('TLE ×',E)
print('RE ×',F)
# coding: utf-8
N=int(input())
L=["AC","WA","TLE","RE"]
cnt=[0,0,0,0]

for i in range(N):
    s=input()
    for j in range(4):
        if s==L[j]:
            cnt[j]+=1

for i in range(4):
    print("{} ×　{}".format(L[i],cnt[i]))
num = (int)(input())
ans = [0, 0, 0, 0]
for i in range(num):
  temp = input()
  if temp == "AC":
    ans[0] += 1
  elif temp == "WA":
    ans[1] += 1
  elif temp == "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())
S = [input() for i in range(N)]
print("AC ×",S.count("AC"))
print("WA ×",S.count("WA"))
print("TLE ×",S.count("TLE"))
print("RE ×",S.count("RE"))
N = int(input())

AC=0
WA=0
TLE=0
RE=0

for i in range(N):
  TEST = input()
  if TEST == "AC":
    AC += 1
  elif TEST == "WA":
    WA += 1
  elif TEST == "TLE":
    TLE += 1
  else:
    RE += 1

print("AC × "+str(AC))
print("WA × "+str(WA))
print("TLE × "+str(TLE))
print("RE × "+str(RE))