peterverebics/CodeNet_Python_118 huggingface dataset:
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))
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())
X0,X1,X2,X3=0,0,0,0
for i in range(N):
    Si=input()
    if Si == 'AC':
        X0 = X0+1

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

    elif Si=='TLE':
        X2=X2+1
    
    else:
        X3=X3+1
 
print('AC x' +str(X0))
print('WA x' +str(X1))
print('TLE x'+str(X2))
print('RE x' +str(X3))
a = []
N = int(input())
for i in range(N):
   s = input()
   a.append(s)

print("AC x {}".format(a.count("AC")))
print("TLE x {}".format(a.count("TLE")))
print("WA x {}".format(a.count("WA")))
print("RE x {}".format(a.count("RE")))
N = int(input())
S = [0]*N
AC = 0
WA = 0
TLE = 0
RE = 0

for n in range(N):
  S[n] = input()
  if S[n] == "AC":
    AC += AC
  elif S[n] == "WA":
    WA += WA
  elif S[n] == "TLE":
    TLE += TLE
  elif S[n] == "RE":
    RE += RE
    
print("AC x {}\nWA x {}\nTLE x {}\nRE x {}".format(AC,WA,TLE,RE))
result = []
for _ in range(int(input())):
  result.append(input())
print("AC X {}".format(result.count("AC")))
print("WA X {}".format(result.count("WA")))
print("TLE X {}".format(result.count("TLE")))
print("RE X {}".format(result.count("RE")))
N = int(input())
List = ['AC', 'WA', 'TLE', 'RE']
List2 = []
for _ in range(N):
    S = input()
    List2.append(S)
result = dict((i, List2.count(i)) for i in List)
Set = set(List) - set(List2)
for key, value in result.items():
    print(key, "x", value)
for k in Set:
    print(k +"x 0")
from collections import Counter
 
a = int(input())
b = Counter([input() for _ in range(a)])
for k,v in b.items():
  print(f"{k} x {v}")
n = int(input())
ans = {
	'AC': 0,
  	'WA': 0,
  	'TLE': 0,
  	'RE': 0
}

for i in range(n):
  x = input()
  ans[x] += 1
  
for i in list(ans.keys()):
  print(i +'x'+str(ans[i]))
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())
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 × {}\nWA × {}\nTLE × {}\nRE × {}".format(AC,WA,TLE,RE))
import collections
n = int(input())
m = [input() for i in range(n)]

check = ["AC","WA","TLE","RE"]
for i in check:
  m.append(i)

c = collections.Counter(m)

for i,j in c.items():
  print(i+ " x " +str(j-1))
n = (int)(input())
C_0 = 0
C_1 = 0
C_2 = 0
C_3 = 0
for i in range(n):
    s = input()
    if s == "AC":
        C_0 += 1  # means C_0 = C_0 + 1
    if s == "WA":
        C_1 += 1
    if s == "TLE":
        C_2 += 1
    else:
        C_3 += 1
print("AC x", C_0)
print("WA x", C_1)
print("TLE x", C_2)
print("RE x", C_3)
n = int(input())
lis = [0 for i in range(4)]
mo = ["AC","WA","TLE","RE"]
for ii in range(n):
    i = input()
    if i=="AC":
        lis[0]+=1
    elif i=="WA":
        lis[1]+=1
    elif i=="TLE":
        lis[2]+=1
    elif i == "RE":
        lis[3]+=1

for i in range(4):
    print(str(mo[i])+" × "+str(lis[i]))
n=int(input())
la=[]
for i in range(n):
    la+=[input()]
print("AC","×",la.count("AC"))
print("WA","×",la.count("WA"))
print("TLE","×",la.count("TLE"))
print("RE","×",la.count("RE"))
L =[]

N = int(input())

for i in range(N):
    S = input()
    L.append(S)

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

l = []
for i in range(N):
    text = input()
    l.append(text)

print("AC" + " x " + str(l.count("AC")))
print("AC" + " x " + str(l.count("WA")))
print("TLE" + " x " + str(l.count("TLE")))
print("RE" + " x " + str(l.count("RE")))
n = int(input())
s = [input() for i in range(n)]

AC = s.count("AC")
WA = s.count("WA")
TLE = s.count("TLE")
RE = s.count("RE")

AC2 = "AC×" + str(AC)
WA2 = "WA×" + str(WA)
TLE2 = "TLE×" + str(TLE)
RE2 = "RE×" + str(RE)

list = [AC2,WA2,TLE2,RE2]
list_n = "\n".join(list)
print(list_n)
N = int(input())
out = ["AC","WA","TLE","RE"]
output = [0]*4

print(output)
for _ in range(N):
    S = input()
    if S == out[0]:
        output[0] += 1
    elif S == out[1]:
        output[1] += 1
    elif S == out[2]:
        output[2] += 1
    else:
        output[3] += 1

print(out[0],"x",output[0])
print(out[1],"x",output[1])
print(out[2],"x",output[2])
print(out[3],"x",output[3],end="")
N = int(input())
S = [None for _ in range(N)]

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

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

print('AC × %d' % a)
print('WA × %d' %b)
print('TLE × %d' %c)
print('RE × %d' %d)
number = int(input())

AC = 0
TLE = 0
WA = 0
RE = 0
chara = []
for i in range(0,number):
    a = input()
    if(a == 'AC'):
        AC = AC + 1
    elif(a == 'TLE'):
        TLE = TLE + 1
    elif (a == 'WA'):
        WA = WA + 1
    elif (a == 'RE'):
        RE = RE + 1

print('AC x ',AC)
print('TLE x ',TLE)
print('WA x ',WA)
print('RE x ',RE)
a=int(input())

b=0
c=0
d=0
e=0

for i in range(a):
  name=input()

  if name=='AC':
    b+=1
  elif name=='WA':
    c+=1
  elif name=='TLE':
    d+=1
  elif name=='RE':
    e+=1

print('AC × '+str(b))
print('WA × '+str(c))
print('TLE × '+str(d))
print('RE × '+str(e))
from collections import defaultdict
n = int(input())
d = defaultdict(int)
d['AC'] = 0
d['RE'] = 0
d['TLE'] = 0
d['WA'] = 0
for _ in range(n):
  s = input()
  d[s] += 1
for x in d:
  print(x, 'x', d[x])
score = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
N = int(input())
for _ in range(N):
    result = input()
    if result == 'AC':
        score[result] += 1
    elif result == 'WA':
        score[result] += 1
    elif result == 'TLE':
        score[result] += 1
    elif result == 'RE':
        score[result] += 1
for i in score.keys():
    print(i, '×', score[i])
n = int(input())
s = list(input() for _ in range(n))
print('AC ×', s.count('AC'))
print('WA ×', s.count('WA'))
print('TLE ×', s.count('TLE'))
print('RE ×', s.count('RE'))
import collections
N = int(input())
S = [input() for _ 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())
ct=0
count=0
a=0
b=0

for i in range(1,n+1):
    s=input()
    if(s=="AC"):
        ct=ct+1
    elif(s=="WA"):
        count=count+1
    elif(s=="TLE"):
        a=a+1
    elif(s=="Re"):
        b=b+1
print("AC X",ct)
print("WA X",count)
print("TLE X",a)
print("RE X",b)
n=int(input())
ans={'AC' : 0, 'WA' : 0, 'TLE' : 0, 'RE' : 0}
for i in range(n):
  s=input()
  ans[s]+=1
print('AC × ' + str(ans['AC']))
print('WA × ' + str(ans['WA']))
print('TLE × ' + str(ans['TLE']))
print('RE × ' + str(ans['RE']))
n = int(input())
if n % 1000 == 0:
    print("0")
else:
    print(((n // 1000) + 1) * 1000 - n)
a = int(input())

str_list = []

str_list = [input() for _ in range(a)]

print("{} {}".format("AC × ", str_list.count('AC')))
print("{} {}".format("WA × ", str_list.count('WA')))
print("{} {}".format("TLE × ", str_list.count('TLE')))
print("{} {}".format("RE × ", str_list.count('RE')))
n = int(input())
lis = [0 for i in range(4)]
mo = ["AC","WA","TLE","RE"]
for ii in range(n):
    i = input()
    if i=="AC":
        lis[0]+=1
    elif i=="WA":
        lis[1]+=1
    elif i=="TLE":
        lis[2]+=1
    elif i == "RE":
        lis[3]+=1

for i in range(4):
    tmp = "{0} × {1}".format(mo[i],lis[i])
    print(tmp)
num = int(input())
count = {"AC":0, "WA":0, "TLE":0, "RE":0}
 
for i in range(num):
  word = input()
  for (key , n) in count.items():
    if word == key:
      count[key] += 1
 
for (key , n) in count.items():
  print(key + " × " + str(n))
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 == "WA":
                  tle += 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=[str(input()) for i in range(N)]

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}")
#!/usr/bin/env python3
import sys
rl = sys.stdin.buffer.readline
read = sys.stdin.buffer.read

N = int(rl())
SL = read().split()

A, W, T, R = ord('A'), ord('W'), ord('T'), ord('R')
na, nw, nt, nr = 0, 0, 0, 0
for s in SL:
  print(s[0])
  if s[0] == A:
    na += 1
  elif s[0] == W:
    nw += 1
  elif s[0] == T:
    nt += 1
  elif s[0] == R:
    nr += 1

print('AC x {}\nWA x {}\nTLE x {}\nRE x {}'.format(na, nw, nt, nr))
N = int(input())

list = [input() for i in range(N)]

AC = int(0)
TLE = int(0)
WA = int(0)
RE = int(0)

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

print("AC × " + str(AC))
print("WA × " + str(WA))
print("TLE × " + str(TLE))
print("RE × " + str(RE))
n = int(input())

ac = wa = tle = re = 0
for i in range(n):
    s = input()
    if s == 'AC':
        ac += 1
    elif s == 'WA':
        wa += 1
    elif s == 'TLE':
        tle += 0
    elif s == 'RE':
        re += 1
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)
d['AC'] = 0
d['RE'] = 0
d['TLE'] = 0
d['WA'] = 0
for _ in range(n):
  s = input()
  d[s] += 1
for x in d:
  print(x, 'X', d[x])
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 x " +  str(C0))
print("WA × " +  str(C1))
print("TLE × " +  str(C2))
print("RE × " +  str(C3))
n = int(input())
a = 0
b = 0
c = 0
d = 0

for i in range(n):
  S = list(map(str, input().split()))
  if S[0] == 'AC':
    a += 1
  if S[0] == 'WA':
    b += 1
  if S[0] == 'TLE':
    c += 1
  if S[0] == 'RE':
    d += 1
print('AC × '+str(a))
print('WA × '+str(b))
print('TLE × '+str(c))
print('RE × '+str(d))
N = int(input())
cn = [0]*4 #AC, WA, TLE, RE
for i in range(N):
  x = input()
  if x == "AC":
    cn[0] += 1
  elif x == "WA":
    cn[1] += 1
  elif x == "TLE":
    cn[2] += 1
  elif x == "RE":
    cn[3] += 1
print("AC ×",cn[0])
print("WA ×",cn[1])
print("TLE ×",cn[2])
print("RE ×",cn[3])
a = input()

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

if 1 <= ac+wa+tle+re <=100000:
    print('AC x '+ str(ac))
    print('WA x '+ str(wa))
    print('TLE x '+ str(tle))
    print('RE x '+ str(re))
from collections import Counter


def main():

    N = int(input())
    lst = []

    for _ in range(N):
        lst.extend(input().split())

    c = dict(Counter(lst))


    for i in ["AC", "WA", "TLE", "RE"]:
        c.setdefault(i, 0)
        print(f"{i} × {c[i]}")


if __name__ == '__main__':
    main()
n = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for _ 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
print('AC x {}'.format(ac))
print('WA x {}'.format(wa))
print('TLE x {}'.format(tle))
print('re x {}'.format(re))
TestCase = int(input())

str_list = []
str_list = [input() for _ in range(TestCase)]

print("{} {}".format("AC ×",str_list.count('AC')))
print("{} {}".format("WA ×",str_list.count('WA')))
print("{} {}".format("TLE ×",str_list.count('TLE')))
print("{} {}".format("RE ×",str_list.count('RE')))
n = int(input())

countA = 0
countW = 0
countT = 0
countR = 0
for i in range(n):
  a = input()
  if a == "AC":
    countA += 1
  elif a == "WA":
    countW += 1
  elif a == "TLE":
    countT += 1
  elif a == "RE":
    countR += 1

print("AC × " + str(countA))
print("WA × " + str(countW))
print("TLE × " + str(countT))
print("RE × " + str(countR))
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
      
    str = ''
    for key in judge_l.keys():
        str += '{} × {}\n'.format(key, judge_l[key])
    print(str.rstrip('\n'))
    
if __name__ == "__main__":
    main()
N=int(input())
S = []
for _ in range(N):
    S.append(input())
print('AC x '+ str(S.count('AC')))
print('WA x '+ str(S.count('AC')))
print('TLE x '+ str(S.count('TLE')))
print('RE x '+ str(S.count('RE')))
# listじゃなくてdict使いたい
n = int(input())
j = [0] * 4
for i in range(n):
    s=input()
    if s == "AC":
        j[0] += 1
    elif s=="WA":
        j[1] += 1
    elif s=="TLE":
        j[2] += 1
    elif s == "RE":
        j[3] += 1
for k in range(4):
    print(f"AC x {j[k]}")
import collections
a=int(input())
b=[input() for i in range(a)]

c=collections.Counter(b)
n,m=zip(*c.most_common())
n=list(n)
m=list(m)
result=[0]*4
for i in range(len(n)):
    if n[i]=='AC':
        result[0]=m[i]
    if n[i]=='WA':
        result[1]=m[i]
    if n[i]=='TLE':
        result[2]=m[i]
    if n[i]=='RE':
        result[3]=m[i]
print('AC x',result[0])
print('WA ×',result[1])
print('TLE ×',result[2])
print('RE ×',result[3])
import sys
import math
from collections import deque
from collections import defaultdict
from copy import deepcopy
from itertools import accumulate #リストを与えると累積和を返す
def input(): return sys.stdin.readline().rstrip()
from functools import lru_cache #メモ化

def main():
    n = int(input())
    s = [input() for _ in range(n)]
    print('AC × {:}'.format(s.count('AC')))
    print('WA × {:}'.format(s.count('WA')))
    print('TLE × {:}'.format(s.count('TLE')))
    print('RE × {:}'.format(s.count('RE')))
    return 0

if __name__ == "__main__":
    main()
N = int(input())  # nは入力回数
S = [input() for _ in range(N)]

C_ac=0
C_wa=0
C_tle=0
C_re=0

for i in S:
    if i  == 'AC':
        C_ac = C_ac + 1 
    elif i  == 'WA':
        C_wa = C_wa + 1 
    elif i  == 'TLE':
        C_tle = C_tle + 1 
    elif i  == 'RA':
        C_ra = C_ra +1 
print("AC x "+str(C_ac))
print("WA x "+str(C_wa))
print("TLE x "+str(C_tle))
print("RE x "+str(C_re))
n = int(input())
s = [input() for i in range(n)]

status = ["AC","WA","TLE","RE"]

for i in range(len(status)):
    status[i] = len([j for j in s if status[i] in s])

print("AC x {}".format(status[0]))
print("WA x {}".format(status[1]))
print("TLE x {}".format(status[2]))
print("RE x {}".format(status[3]))
n = int(input())
k = [input() for i in range(n)]
ac = 0
wa = 0
tle = 0
re = 0

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

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

for k in s:
    res[k] = res[k] + 1

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

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

print("AC x ", c0)
print("WA x ", c1)
print("TLE x ", c2)
print("RTE x ", c3)
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(str(i) +" × " +str(j))
N=int(input())
S=list(map(str, input().split()))
x=S.count("AC")
y=S.count("WA")
z=S.count("TLE")
w=S.count("RE")
print("AC x []".format(x))
print("WA x []".format(y))
print("TLE x []".format(z))
print("RE x []".format(w))
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))
# -*- coding: utf-8 -*-
"""
Created on Sat Aug 15 17:00:46 2020

@author: saito
"""

# %% import phase

# %% define phase

# %% input phase
N = int(input())
S = [0]*N
for i in range(N):
    S[i] = input()

# %% process phase
C = [0]*4
rslt = ['AC', 'WA', 'TLE', 'RE']
for i in range(4):
    C[i] = S.count(rslt[i])

# %%output phase
for i in range(4):
    print(rslt[i]+' '+'×'+' '+str(C[i]))
N=int(input())

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

for n in range(N):
    S=input()
    if S=="AC":
        C0+=1
    elif S=="WA":
        C1+=1
    elif S=="TLE":
        C2+=1
    else:
        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())
ac = 0
wa = 0
tle = 0
re = 0
for i in range(n):
  string = input()
  if string == 'AC':
    ac += 1
  elif string == 'WA':
    wa += 1
  elif string == 'TLE':
    tle += 1
  else:
    re += 1
print('AC X',ac)
print('WA X',ac)
print('TLE X',ac)
print('RE X',ac)
n = int(input())
s = [0 for i in range(4)]
for i in range(n):
    t = input()
    if t == "AC":
        s[0] += 1
    elif t == "WA":
        s[1] += 1
    elif t == "TLE":
        s[2] += 1
    elif t == "RE":
        s[3] += 1

for i in s:
    print("AC x",i)
#-------------------- fast io --------------------
import sys

sys.setrecursionlimit(500005)
stdin = sys.stdin

ns = lambda: stdin.readline().strip()
na = lambda: list(map(int, stdin.readline().split()))
ni = lambda: int(ns())

m = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
n = ni()
for i in range(n):
    m[ns()] += 1

print(f"AC x {m['AC']}")
print(f"WA x {m['WA']}")
print(f"TLE X {m['TLE']}")
print(f"RE X {m['RE']}")
N = int(input())

cnt_ac = 0
cnt_wa = 0
cnt_tle = 0
cnt_re = 0

for i in range(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

print('AC × {}'.format(cnt_ac))
print('WA × {}'.format(cnt_wa))
print('TLE × {}'.format(cnt_tle))
print('RE × {}'.format(cnt_re))
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))
print('WA × '+str(C1))
print('TLE × '+str(C2))
print('RE × '+str(C3))
N = int(input())
AC =[]
WA =[]
TLE =[]
RE =[]

for i in range(N):
    s = str(input())
    if s == "AC":
        AC.append(s)
    elif s == "WA":
        WA.append(s)
    elif s == "TLE":
        TLE.append(s)
    elif s =="RE":
        RE.append(s)
print("AC × "+str(len(AC)))
print("WA × "+str(len(WA)))
print("TLE × "+str(len(TLE)))
print("RE × "+str(len(RE)))
tr=int(input())
word=input()
a=0
w=0
t=0
r=0
i=0
for i in range(1<=tr<=10*5):
    i+=1
    if word=='AC':
        a+=1
    elif word=='WA':
        w+=1
    elif word=='TLE':
        t+=1
    else:
        r+=1
print('AC*a')
print('WA*w')
print('TLE*t')
print('RE*r')
from collections import Counter

n = int(input())
words = Counter([input() for i in range(n)])

for i in ("AC", "WA", "TLE", "RE"):
    print(f"{i} X {words.get(i, 0)}")
N = int(input()) #1行目のNを取得する
s = [input() for i in range(N)] #複数行の数値の入力を取得
ac = s.count("AC")
wa = s.count("wa")
tle = s.count("TLE")
re = s.count("RE")
print("AC x "+str(ac))
print("WA x "+str(wa))
print("TLE x "+str(tle))
print("RE x "+str(re))
n = int(input())

j = list()
for _ in range(n):
    string = input()
    j.append(string)

ac = j.count("AC")
wa = j.count("WA")
tel = j.count("TEL")
re = j.count("RE")
print("AC x " + str(ac))
print("WA x " + str(wa))
print("TEL x " + str(tel))
print("RE x " + str(re))
n=int(input())
l=[0,0,0,0]
for _ in range(n):
	s=input()
	if(s=='AC'):
		l[0]+=1
	elif(s=='WA'):
		l[1]+=1
	elif(s=='TLE'):
		l[2]+=1
	elif(s=='RE'):
		l[3]+=1
print("AC X",l[0])
print("WA X",l[1])
print("TLE X",l[2])
print("RE X",l[3])
n = int(input())
v = [0] * 4
for i in range(n):
    s = input()
    if s == 'AC': v[0] += 1
    elif s == 'WA': v[1] += 1
    elif s == 'TLE': v[2] += 1
    else: v[3] += 1
print('AC x ',v[0])
print('WA x ',v[1])
print('TLE x ',v[2])
print('WA x ',v[3])
n = int(input().rstrip())
s = list(map(str,input().rstrip().split()))
print("AC ×",s.count("AC"))
print("WA ×",s.count("WA"))
print("TLE ×",s.count("TLE"))
print("RE ×",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
  else:
    r+=1
print('AC×'+str(a))
print('WA×'+str(w))
print('TLE×'+str(t))
print('RE×'+str(r))
# -*- coding: utf-8 -*-
# 整数の入力
TestCase = int(input())

str_list = []
str_list = [input() for _ in range(TestCase)]

#表示
print("{} {}".format("AC ×",str_list.count('AC')))
print("{} {}".format("WA ×",str_list.count('WA')))
print("{} {}".format("TLE ×",str_list.count('TLE')))
print("{} {}".format("RE ×",str_list.count('RE')))
N = int(input())
d = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
 
for _ in range(N):
    d[input()]+=1

for s in ['AC', 'WA', 'TLE', 'RE']:
    print(f'{s} X {d[s]}')
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")
t = int(input())
d = dict()
d['TLE'] = 0
d['AC'] = 0
d['WA'] = 0
d['RE'] = 0
while t > 0:
    s = input()
    if s == 'TLE':
        d['TLE'] += 1
    elif s == 'WA':
        d['WA'] += 1
    elif s == 'RE':
        d['RE'] += 1
    elif s == 'AC':
        d['AC'] += 1
    t-=1
print('AC', 'X' ,d['AC'])
print('WA', 'X' ,d['WA'])
print('TLE', 'X' ,d['TLE'])
print('RE', 'X' ,d['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 × "+ str(j[0]))
print("WA × "+ str(j[1]))
print("TLE × "+ str(j[2]))
print("RE × "+ str(j[3]))
n=int(input())
m={"AC":0,"WA":0,"TLE":0,"RE":0}
for i in range(n):
  s=input() 
  if s=="AC":
    m[s]+=1
  elif s=="WA":
    m[s]+=1 
  elif s=="RE":
    m[s]+=1
  elif s=="TLE":
    m[s]+=1
print("AC x",m["AC"])
print("WA x",m["WA"])
print("TLE x",m["TLE"])
print("RE ",m["RE"])
N=int(input())
S= [input() for i in range(N)]
AC_len=int(S.count('AC'))
WA_len=int(S.count('WA'))
TLE_len=int(S.count('TLE'))
RE_len=int(S.count('RE'))
print('AC X'+' '+str(AC_len))
print('WA X'+' '+str(WA_len))
print('TLE X'+' '+str(TLE_len))
print('RE X'+' '+str(RE_len))