peterverebics/CodeNet_Python_118 huggingface dataset:
n = int(input())
c0 = 0
c1 = 0
c2 = 0
c3 = 0
for _ in range(n):
    word = input()
    if word=='AC':
        c0 +=1
    elif word == 'WA':
        c1 +=1
    elif word == '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())
s = [""]*n
for i in range(n):
  s[i] = input()
ac,wa,tle,re = 0,0,0,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 x %d\nWA x %d\nTLE x %d\nRE x %d" % (ac,wa,tle,re))
from collections import defaultdict

N = int(input())
dic = defaultdict(int)
for i in range(N):
    S = input()
    dic[S] = dic[S] + 1

print("AC x", dic["AC"])
print("WA x", dic["WA"])
print("TLE x", dic["TLE"])
print("RE x", dic["RE"])
from collections import *
n = int(input())
a = []
for i in range(n):
	a.append(input())
c = Counter(a)
for i in ['AC', 'WA', 'TLE', 'RE']:
	if(i not in c): c[i] = 0
	print(i,'x',c[i])
n = int(input())
s = [input() for i in range(n)]
ans = ['AC', 'WA', 'TLE', 'RE']
for i in ans:
    print(i, 'x', s.count(i))
import numpy as np

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

print("AC x {0}".format(AC))
print("WA x {0}".format(WA))
print("TLE x {0}".format(TLE))
print("RE x {0}".format(RE))
from collections import Counter

N = int(input())

li = []

for _ in range(N):
    li.append(input())

a =  Counter(li)
# print(a)

print("AC x " + str(a["AC"]))
print("WA x " + str(a["WA"]))
print("TLE x " + str(a["TLE"]))
print("RE x " + str(a["RE"]))
N = 0
S = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}

try:
  N = int(input())
  for i in range(N):
      result = input()
      for k in S:
          if k == result:
              S[k] += 1
except:
  pass

for k in S:
    print('%s x %d' % (k, S[k]))
n=int(input())
s=list(input() for i in range(n))
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())
d=dict()
for tt in range(N):
    s=input()
    if s not in d:
        d[s]=1
    else:
        d[s]+=1
for st in ["AC","WA","TLE","RE"]:
    if st not in d:
        print(st," x ",0)
    else:
        print(st," x ",d[st])
def main():
    import sys
    input = sys.stdin.readline

    JUDGE = 'AC', 'WA', 'TLE', 'RE'

    ctr = dict()
    for case in JUDGE:
        ctr[case] = 0

    N = int(input())
    for _ in range(N):
        s = input().rstrip()
        ctr[s] += 1

    for case in JUDGE:
        print(case, 'x', ctr[case])


if __name__ == '__main__':
    main()
N = int(input())
result = [input() for i in range(N)]
def f(s, result):
    return '%s x %d'%(s, result.count(s))
print(f('AC', result))
print(f('WA', result))
print(f('TLE', result))
print(f('RE', result))
N = int(input())
S=[]

for n in range(N):
    S.append(input())

AC ='AC x '
WA ='WA x '
TLE ='TLE x '
RE ='RE x '


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

d = dict()

for _ in range(n):
    k = input()
    if d.get(k):
        d[k] += 1
    else:
        d[k] = 1

for kk in ['AC', 'WA', 'TLE', 'RE']:
    if d.get(kk):
        print(kk + ' x ' + str(d.get(kk)))
    else:
        print(kk + ' x 0')
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 x " + str(counter[0]))
print("WA x " + str(counter[1]))
print("TLE x " + str(counter[2]))
print("RE x " + str(counter[3]))
#abc173b
n=int(input())
s=[]
for i in range(n):
 s.append(input())
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())
ac, wa, tle, re = 0, 0, 0, 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 %d\nWA x %d\nTLE x %d\nRE x %d' % (ac, wa, tle, re))
N = int(input())
S_list = [input() for _ in range(N)]
res_list = ['AC', 'WA', 'TLE', 'RE']

for res in res_list:
    print(res + ' x ' + str(S_list.count(res)))
n=int(input())
count1=0
count2=0
count3=0
count4=0
for i in range(n):
    s=input()
    if s=='AC':
        count1+=1
    elif s=='WA':
        count2+=1
    elif s=='TLE':
        count3+=1
    else:
        count4+=1
print('AC x '+str(count1))
print('WA x '+str(count2))
print('TLE x '+str(count3))
print('RE x '+str(count4))
n = int(input())
li = [input() for i in range(n)]

print("AC x " + str(li.count("AC"))) 
print("WA x " + str(li.count("WA"))) 
print("TLE x " + str(li.count("TLE"))) 
print("RE x " + str(li.count("RE")))
n = int(input())
c0 = 0
c1 = 0
c2 = 0
c3 = 0
for i in range(n):
    c = input()
    if c == 'AC':
        c0 += 1
    elif c == 'WA':
        c1 += 1
    elif c == 'TLE':
        c2 += 1
    else:
        c3 += 1
print(f'AC x {c0}')
print(f'WA x {c1}')
print(f'TLE x {c2}')
print(f'RE x {c3}')
N = int(input())

sc = {"AC":0, "WA":0, "TLE":0, "RE":0} 

for i in range(N):
  S = input()
  sc[S] += 1
#
print("AC", " x ", sc["AC"])
print("WA", " x ", sc["WA"])
print("TLE", " x ", sc["TLE"])
print("RE", " x ", sc["RE"])
N = int(input())
S = [input() for i in range(N)]
c0, c1, c2, c3 = 0, 0, 0, 0
for i in S:
    if i == 'AC':
        c0 += 1 
    if i == 'WA':
        c1 += 1
    if i == 'TLE':
        c2 += 1
    if i == 'RE':
        c3 += 1
print('AC','x',c0)
print('WA','x',c1)
print('TLE','x',c2)
print('RE','x',c3)
import sys
from collections import defaultdict

def solve():
    input = sys.stdin.readline
    N = int(input())
    C = defaultdict(int)
    for _ in range(N):
        s = input().strip("\n")
        C[s] += 1
    P = ["AC", "WA", "TLE", "RE"]

    for p in P:
        print(p + " x " + str(C[p]))
    return 0

if __name__ == "__main__":
    solve()
import collections
N=int(input())
S=[str(input()) for _ in range(N)]
C=collections.Counter(S)
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())
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 x " + str(ac))
print("WA x " + str(wa))
print("TLE x " + str(tle))
print("RE x " + str(re))
N=int(input())
ca=0
cw=0
ct=0
cr=0
for _ in range(N):
  a=input()
  if a=='AC':
    ca+=1
  elif a=='WA':
    cw+=1
  elif a=='TLE':
    ct+=1
  elif a=='RE':
    cr+=1
    
print('AC x',ca)
print('WA x',cw)
print('TLE x',ct)
print('RE x',cr)
N = int(input())
x = []
for _ in range(N):
    s = input()
    x.append(s)
print('AC'+ ' '+ 'x'+ ' '+str(x.count('AC')))
print('WA'+ ' '+ 'x'+ ' '+str(x.count('WA')))
print('TLE'+ ' '+ 'x'+ ' '+str(x.count('TLE')))
print('RE'+ ' '+ 'x'+ ' '+str(x.count('RE')))
num = int(input())

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

for i in range(num):
    k = input()
    if k == "AC":
        ac += 1
    elif k == "WA":
        wa += 1
    elif k == "TLE":
        tle += 1
    elif k == "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())

ac = 0
wa = 0
tle = 0
re = 0
for i in range(n):
    w = input()
    if(w == 'AC'):
        ac += 1
    elif(w == 'WA'):
        wa += 1
    elif(w == 'TLE'):
        tle += 1
    elif(w == '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())
s = [input() for i in range(n)]

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):
	a=input()
	if a=='AC':
		A+=1
	if a=='WA':
		W+=1
	if a=='TLE':
		T+=1
	if a=='RE':
		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())
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 x {}".format(a))
print("WA x {}".format(b))
print("TLE x {}".format(c))
print("RE x {}".format(d))
N = int(input())
S = []
for i in range(N):
  S.append(str(input()))
           

print('AC x %d' % S.count('AC'))
print('WA x %d' % S.count('WA'))
print('TLE x %d' % S.count('TLE'))
print('RE x %d' % S.count('RE'))
Si = []
N = input()
for i in range(int(N)):
	Si.append(input())

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

print('AC x', int(C0))
print('WA x', int(C1))
print('TLE x', int(C2))
print('RE x', int(C3))
n=int(input())
d=dict()
a=["AC","WA","TLE","RE"]
for x in a:
	d[x]=0
for _ in range(n):
	d[input()]+=1
for x in a:
	print(x + " x " + str(d[x]))
N=input();
N=int(N);
S=[];
ans=[0,0,0,0];
for i in range(N):
  s=input();
  if s=="AC":
    ans[0]=ans[0]+1;
  if s=="WA":
    ans[1]=ans[1]+1;
  if s=="TLE":
    ans[2]=ans[2]+1;
  if s=="RE":
    ans[3]=ans[3]+1;
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,*S,=open(0).read().split()
N=int(N)
C0=S.count('AC')
C1=S.count('WA')
C2=S.count('TLE')
C3=S.count('RE')
print('AC x '+str(C0))
print('WA x '+str(C1))
print('TLE x '+str(C2))
print('RE x '+str(C3))
N = int(input())
str_list = []
str_list = [str(input()) for i in range(N)]

print('AC x ' + str(str_list.count(('AC'))))
print('WA x ' + str(str_list.count(('WA'))))
print('TLE x ' + str(str_list.count(('TLE'))))
print('RE x ' + str(str_list.count(('RE'))))
N = int(input())
data = [input() for x in range(N)]

keys_list = ['AC','WA','TLE','RE']
check_list = {'AC':0,'WA':0,'TLE':0,'RE':0}

for x in data:
    check_list[x] = check_list[x] + 1

for x in keys_list:
    print('{} x {}'.format(x,check_list[x]))
n=int(input())
ac=0
wa=0
tle=0
re=0

for i in range(n):
    x=input()
    if x == 'AC':
        ac+=1
    elif x == 'WA':
        wa+=1
    elif x == 'TLE':
        tle+=1
    elif x == '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=[]
for i in range(n):
  a.append(input())
print("AC x",a.count("AC"))
print("WA x",a.count("WA"))
print("TLE x",a.count("TLE"))
print("RE x",a.count("RE"))
#abc173
n = int(input())
ln ={'AC': 0,'WA': 0,'TLE': 0,'RE': 0}  #ln[0] = AC, 1= WA, 2 =TLE, 3 =RE
for i in range(n):
    s = input()
    ln[s] += 1
for i,j in ln.items():
    print(i +' x ' + str(j))
n = int(input())
s = [input() for i in range(n)]
from collections import Counter
b = Counter(s)
print('AC x '+str(b['AC']))
print('WA x '+str(b['WA']))
print('TLE x '+str(b['TLE']))
print('RE x '+str(b['RE']))
from sys import stdin


def main():
    N, *S = [i.strip() for i in stdin.readlines()]
    N = int(N)
    judge = ["AC", "WA", "TLE", "RE"]
    mul = " x "
    C = [0] * len(judge)
    for Si in S:
        C[judge.index(Si)] += 1
    print("\n".join((judge[i] + mul + str(C[i]) for i in range(len(judge)))))
    return


main()
N = int(input())
count_ac = 0
count_wa = 0
count_tle = 0
count_re = 0
for i in range(N):
    S = input()
    if S == "AC":
        count_ac += 1
    if S == "WA":
        count_wa += 1
    if S == "TLE":
        count_tle += 1
    if S == "RE":
        count_re += 1
    del S

print("AC x ",count_ac)
print("WA x ",count_wa)
print("TLE x ",count_tle)
print("RE x ",count_re)
from collections import defaultdict
n = int(input())
d = defaultdict(int)
for i in range(n):
    word = str(input())
    d[word]+=1
print("{} {} {}".format("AC","x",d["AC"]))
print("{} {} {}".format("WA","x",d["WA"]))
print("{} {} {}".format("TLE","x",d["TLE"]))
print("{} {} {}".format("RE","x",d["RE"]))
# -*- coding: utf-8 -*-
n=int(input())
slist=[]
for i in range(n):
  moji=str(input())
  slist.append(moji)
numdic={}
for chr in ["AC","WA","TLE","RE"]:
  numdic[chr]=slist.count(chr)
for chr,val in numdic.items():
  print(chr," x ",val)
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')

print('AC x ' + str(AC))
print('WA x ' + str(WA))
print('TLE x ' + str(TLE))
print('RE x ' + str(RE))
import sys
input = sys.stdin.readline

N = int(input())
dic = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
for i in range(N):
    dic[input().rstrip('\n')] += 1
for k, v in dic.items():
    print(k, 'x', v)
n =int(input())
list=[]
for i in range(n):
    s = input()
    list.append(s)
print('AC x '+str(list.count('AC')))
print('WA x '+str(list.count('WA')))
print('TLE x '+str(list.count('TLE')))
print('RE x '+str(list.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
    if(S == 'WA'):
        WA += 1
    if(S == 'TLE'):
        TLE += 1
    if(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())
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))
n=int(input())
s=[]
for i in range(n):
    s.append(input())
print('AC x {}'.format(s.count('AC')))
print('WA x {}'.format(s.count('WA')))
print('TLE x {}'.format(s.count('TLE')))
print('RE x {}'.format(s.count('RE')))
n = int(input())
c0 = 0
c1 = 0
c2 = 0
c3 = 0
for _ in range(n):
  s = input()
  if s == 'AC':
    c0 += 1
  elif s == 'WA':
    c1 += 1
  elif s == 'TLE':
    c2 += 1
  elif s == 'RE':
    c3 += 1
print('AC x', c0)
print('WA x', c1)
print('TLE x', c2)
print('RE x', c3)
N = int(input())
S = [input() for _ 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
    else:
        pass

print('AC x ' + str(AC))
print('WA x ' + str(WA))
print('TLE x ' + str(TLE))
print('RE x ' + str(RE))
N=int(input())
S=[input() for i in range(N)]
C0=str(S.count("AC"))
C1=str(S.count("WA"))
C2=str(S.count("TLE"))
C3=str(S.count("RE"))
print("AC x "+C0)
print("WA x "+C1)
print("TLE x "+C2)
print("RE x "+C3)
N = int(input())
S = [input() for _ in range(N)]
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())
d = {}
d['AC'] = 0
d['WA'] = 0
d['TLE'] = 0
d['RE'] = 0
for i in range(n):
    s = str(input())
    d[s] += 1

print('AC', 'x', d['AC'])
print('WA', 'x', d['WA'])
print('TLE', 'x', d['TLE'])
print('RE', 'x', d['RE'])
numtcs = int(input())
judgement = []
for i in range(numtcs):
	judgement.append(input())

numac = judgement.count("AC")
print(f'AC x {numac}')
numwa = judgement.count("WA")
print(f'WA x {numwa}')
numtle = judgement.count("TLE")
print(f'TLE x {numtle}')
numre = judgement.count("RE")
print(f'RE x {numre}')
N = int(input())

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

for i in range(N):
  wrk = input()
  d[wrk] = d[wrk]+1

print('AC x ',d['AC'])
print('WA x ',d['WA'])
print('TLE x ',d['TLE'])
print('RE x ',d['RE'])
N = int(input())
count_AC = 0
count_WA = 0
count_TLE = 0
count_RE = 0 


for i in range(N):
    tmp = str(input())
    if tmp == "AC":
        count_AC += 1
    elif tmp == "WA":
        count_WA += 1
    elif tmp == "TLE":
        count_TLE += 1
    else:
        count_RE += 1

print("AC x " + str(count_AC))
print("WA x " + str(count_WA))
print("TLE x " + str(count_TLE))
print("RE x " + str(count_RE))
a = int(input())
x = []
for i in range(a):
    x.append(input())
print("AC x " + str(x.count("AC")))
print("WA x " + str(x.count("WA")))
print("TLE x " + str(x.count("TLE")))
print("RE x " + str(x.count("RE")))
n=int(input())
result={'AC':0,'WA':0,'TLE':0,'RE':0}
for _ in range(n):
  result[input()] += 1
for i,j in result.items():
  print(f'{i} x {j}')
def main():
    n = int(input())
    d = {}
    for _ in range(n):
        s = input()
        d[s] = d.get(s, 0) + 1
    
    print('AC x ' + str(d.get('AC', 0)))
    print('WA x ' + str(d.get('WA', 0)))
    print('TLE x ' + str(d.get('TLE', 0)))
    print('RE x ' + str(d.get('RE', 0)))

    
if __name__ == '__main__':
    main()
n = int(input())

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

for _ in range(n):
  judge = input()
  if judge == 'AC':
    AC += 1
  elif judge == 'WA':
    WA += 1
  elif judge == 'TLE':
    TLE += 1
  elif judge == 'RE':
    RE += 1

print('AC x {}'.format(AC))
print('WA x {}'.format(WA))
print('TLE x {}'.format(TLE))
print('RE x {}'.format(RE))
#coding:utf-8

N = int(input())

ans = [0,0,0,0]

for i in range(N):
    S = str(input())
    if S == 'AC':
        ans[0] += 1
    elif S == 'WA':
        ans[1] += 1
    elif S == 'TLE':
        ans[2] += 1
    elif S == 'RE':
        ans[3] += 1

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())
s = [input() for i in range(n)]
for k in ['AC', 'WA', 'TLE', 'RE']:
    print(k, 'x', s.count(k))
N = int(input())
n = list(input() for i in range(N))
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)
from collections import Counter
N = int(input())
C = Counter()
for i in range(N):
    si = input()
    C[si] += 1
for s in ['AC', 'WA', 'TLE', 'RE']:
    print(s, 'x', C[s])
import sys
input()
d=dict.fromkeys('AC WA TLE RE'.split(),0)
for ln in sys.stdin:
    d[ln.strip()]+=1
for k,v in d.items():
    print(k,'x',v)
N = int(input())
d = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
for _ in range(N):
    S = input()
    d[S] += 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']))
cases = int(input())

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

arr = []
for i in range(cases):
    x = input()
    if x == "AC":
        ac_count += 1
    elif x == "WA":
        wa_count += 1
    elif x == "TLE":
        tle_count += 1
    elif x == "RE":
        re_count += 1

print("AC x {0}".format(ac_count))
print("WA x {0}".format(wa_count))
print("TLE x {0}".format(tle_count))
print("RE x {0}".format(re_count))
import sys
from collections import Counter
input = sys.stdin.readline
N = int(input())
c = Counter()
for _ in range(N): c[input()[: -1]] += 1
print("AC x", c["AC"])
print("WA x", c["WA"])
print("TLE x", c["TLE"])
print("RE x", c["RE"])
N = int(input())
l = [input() for i in range(N)]
print("AC x {0}".format(l.count('AC')))
print("WA x {0}".format(l.count('WA')))
print("TLE x {0}".format(l.count('TLE')))
print("RE x {0}".format(l.count('RE')))
S = [input() for n in range(int(input()))]
for s in ["AC","WA","TLE","RE"]:
  print(s,"x",S.count(s))
import collections
N = int(input())
S=[]
for i in range(N):
    S.append(input())
c = collections.Counter(S)
print('AC x {}'.format(c['AC']))
print('WA x {}'.format(c['WA']))
print('TLE x {}'.format(c['TLE']))
print('RE x {}'.format(c['RE']))
from collections import Counter
N = int(input())
x = []
for _ in range(N):
    x.append(input())
c = Counter(x)
print("AC x {}".format(c["AC"]))
print("WA x {}".format(c["WA"]))
print("TLE x {}".format(c["TLE"]))
print("RE x {}".format(c["RE"]))
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
  elif s == "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())
k=[]
for i in(range(n)):
  k.append(str(input()))
ac=k.count('AC')
wa=k.count('WA')
tle=k.count('TLE')
re=k.count('RE')
print('AC x',ac)
print('WA x',wa)
print('TLE x',tle)
print('RE x',re)
N = int(input())

count = dict.fromkeys(["AC", "WA", "TLE", "RE"], 0)

for idx in range(N):
  S = input()
  count[S] += 1

for k, v in count.items():
  print(k, "x", v)
n=int(input())
L=[0,0,0,0]
x = [input() for i in range(n)]

for i in range(n):

  if x[i]=='AC':
    L[0]=L[0]+1
  elif x[i]=='WA':
    L[1]=L[1]+1
  elif x[i]=='TLE':
    L[2]=L[2]+1
  else:
    L[3]=L[3]+1


print('AC'+' x '+str(L[0]))
print('WA'+' x '+str(L[1]))
print('TLE'+' x '+str(L[2]))
print('RE'+' x '+str(L[3]))
N = int(input())
arr = []

for _ in range(N):
    arr.append(input())

print(f'AC x {arr.count("AC")}')
print(f'WA x {arr.count("WA")}')
print(f'TLE x {arr.count("TLE")}')
print(f'RE x {arr.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

print('AC x '+str(AC))
print('WA x '+str(WA))
print('TLE x '+str(TLE))
print('RE x '+str(RE))
N=int(input())
S = []
for _ in range(N):
    S.append(input())
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
  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())
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())
word_list = ['AC','WA','TLE','RE']
A = 0
W = 0
T = 0
R = 0

for i in range(n):
    s = input()
    if s == 'AC':
        A = A + 1
    elif s == 'WA':
        W = W + 1
    elif s == 'TLE':
        T = T + 1
    else:
        R = R + 1
Ans_list = [A,W,T,R]
for i in range(4):
    print(str(word_list[i])+ ' x '+ str(Ans_list[i]))
n = int(input())
c = [0]*4
for _ in range(n):
    s = str(input())
    if s == 'AC':
        c[0] += 1
    elif s == 'WA':
        c[1] += 1
    elif s == 'TLE':
        c[2] += 1
    else:
        c[3] += 1

print('AC x '+str(c[0]))
print('WA x '+str(c[1]))
print('TLE x '+str(c[2]))
print('RE x '+str(c[3]))
from collections import Counter


def f(x):
    print("{} x {}".format(x, c[x]))


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

c = Counter(s)

f("AC")
f("WA")
f("TLE")
f("RE")
N = int(input())
status = []
for i in range(N):
    S = str(input())
    status.append(S)

print('AC x %d'% status.count("AC"))
print('WA x %d'% status.count('WA'))
print('TLE x %d'% status.count('TLE'))
print('RE x %d'% status.count('RE'))
num=int(input().rstrip())
cases=[]
for i in range(num):
    cases.append(input().rstrip())
target=['AC','WA','TLE','RE']
result=[0,0,0,0]
for j in range(len(target)):
    for i in range(len(cases)):
        if cases[i]==target[j]:
            result[j]=result[j]+1
for i in range(len(target)):
    print(target[i]+' x '+str(result[i]))
def INT():
    return int(input())

def MI():
    return map(int, input().split())

def LI():
    return list(map(int, input().split()))

from collections import  Counter
N = INT()
S = [input() for _ in range(N)]

S = Counter(S)
print(f"AC x {S['AC']}")
print(f"WA x {S['WA']}")
print(f"TLE x {S['TLE']}")
print(f"RE x {S['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))
from collections import defaultdict
n = int(input())
s = [input() for _ in range(n)]
table = defaultdict(int)
for i in s:
    table[i] += 1
for j in ["AC", "WA", "TLE", "RE"]:
    print(j+" "+"x"+" "+str(table[j]))