peterverebics/CodeNet_Python_118 huggingface dataset:
n = int(input())
ac = 0
wa = 0
tle = 0
re = 0

for i in range(n) :
    s = input().rstrip('\n')
    if s == 'AC' :
        ac += 1
    elif s == 'WA' :
        wa += 1
    elif s == 'TLE' :
        tle += 1
    elif s == 'RE' :
        re += 1

print('AC x',ac)
print('WA x',wa)
print('TLE x',tle)
print('RE x',re)
count1=0
count2=0
count3=0
count4=0
N=int(input())
for i in range(N):
  A=input()
  if A=="AC":
    count1=count1+1
  elif A=="WA":
    count2=count2+1
  elif A=="TLE":
    count3=count3+1
  elif A=="RE":
    count4=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())

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

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

print("AC x %s" %(ac))
print("WA x %s" %(wa))
print("TLE x %s" %(tle))
print("RE x %s" %(re))
N=int(input())
li=[input() for i in range(N)]

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

print("AC x "+str(a))
print("WA x "+str(b))
print("TLE x "+str(c))
print("RE x "+str(d))
n = int(input())
dic = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
for i in range(n):
	s = input()
	dic[s] += 1
for k, v in dic.items():
	print("%s x %s" % (k, v))
n = int(input())

li = [input() for _ in range(n)]

check = ['AC', 'WA', 'TLE', 'RE']
ans = [0] * 4

for i in li:
    for j in range(4):
        if i == check[j]:
            ans[j] += 1
            
for i in range(4):
    print(check[i] + ' x ' + str(ans[i]))
n = int(input())
l = []
i = 1
while i<=n:
    a = input()
    l.append(a)
    i+=1
print("AC x "+ str(l.count("AC")))
print("WA x "+ str(l.count("WA")))
print("TLE x "+ str(l.count("TLE")))
print("RE x "+ str(l.count("RE")))
results = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
N = int(input())
for _ in range(N):
  S = input()
  results[S] = results[S] + 1

for k, v in results.items():
  print(k, 'x', v)
def main():
  n = int(input())
  c = [0,0,0,0]
  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
    else:
      c[3] += 1
  print(f'AC x {c[0]}')
  print(f'WA x {c[1]}')
  print(f'TLE x {c[2]}')
  print(f'RE x {c[3]}')
main()
n = int(input())

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


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

lst_ans = ['AC', 'WA', 'TLE', 'RE']
for i in lst_ans:
  print("{} x {}".format(i, lst[i]))
AC = 0
WA = 0
TLE = 0
RE = 0

a_list = [input() for j in range(int(input()))]

for a in a_list:
  if a == "AC":
    AC += 1
  elif a == "WA":
    WA += 1
  elif a == "TLE":
    TLE += 1
  else:
    RE += 1
  
print(f"AC x {AC}\nWA x {WA}\nTLE x {TLE}\nRE x {RE}")
n = int(input())
s = [input() for i in range(n)]

print('AC x ' + str(s.count('AC')))
print('WA x ' + str(s.count('WA')))
print('TLE x ' + str(s.count('TLE')))
print('RE x ' + str(s.count('RE')))
N = int(input())
A  = [input() for _ in range(N)]
c0=A.count("AC")
c1=A.count("WA")
c2=A.count("TLE")
c3=A.count("RE")
print("AC x",c0)
print("WA x",c1)
print("TLE x",c2)
print("RE x",c3)
n = int(input())

slist = [0]*4
for i in range(n):
    result = input()

    if result == "AC":
        slist[0]+=1
    if result == "WA":
        slist[1]+=1
    if result == "TLE":
        slist[2]+=1
    if result == "RE":
        slist[3]+=1

print("AC x ",slist[0])
print("WA x ",slist[1])
print("TLE x ",slist[2])
print("RE x ",slist[3])
N = int(input())
C = [0, 0, 0, 0]
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

s = "AC x " + str(C[0]) + "\nWA x " + str(C[1]) + "\nTLE x " + str(C[2]) + "\nRE x " + str(C[3])
print(s)
N=int(input())

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

print("AC x",r.count("AC"))
print("WA x",r.count("WA"))
print("TLE x",r.count("TLE"))
print("RE x",r.count("RE"))
N=int(input())
L=[]
for i in range(N):
    L.append(input())
C=[]
W=['AC', 'WA', 'TLE', 'RE' ]
Q=[0,0,0,0]
for i in range(N):
    for j in range(4):
        if L[i]==W[j]:
            Q[j]=Q[j]+1
            break
print('AC x '+str(Q[0]))
print('WA x '+str(Q[1]))
print('TLE x '+str(Q[2]))
print('RE x '+str(Q[3]))
n = int(input())
c0 = c1 = c2 = 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 {}\nWA x {}\nTLE x {}\nRE x {}'.format(c0, c1, c2, c3))
N=int(input())
a=0
b=0
c=0
d=0
for _ 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 x '+str(a))
print('WA x '+str(b))
print('TLE x '+str(c))
print('RE x '+str(d))
n = input()
check = [input() for i in range(int(n))]

print('AC x %d' % check.count('AC'))
print('WA x %d' % check.count('WA'))
print('TLE x %d' % check.count('TLE'))
print('RE x %d' % check.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("AC x", ac)
print("WA x", wa)
print("TLE x", tle)
print("RE x", re)
n = int(input())
l =[input() for _ in range(n)]
a=0
b=0
c=0
d=0
for i in l:
    if i == "AC":
        a += 1
    if i == "WA":
        b += 1
    if i == "TLE":
        c += 1
    if i == "RE":
        d += 1

print("AC x "+str(a))
print("WA x "+str(b))
print("TLE x "+str(c))
print("RE x "+str(d))
# B - Judge Status Summary

n = int(input())

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

for i in range(n):
    j =input()
    if j == 'AC':
        AC += 1
    elif j == 'WA':
        WA += 1
    elif j == 'TLE':
        TLE += 1
    elif j == 'RE':
        RE += 1
print('''
AC x {}
WA x {}
TLE x {}
RE x {}
'''.format(AC,WA,TLE,RE))
n=int(input())
s=[input() for _ in range(n)]

print("AC x "+str(s.count("AC")))
print("WA x "+str(s.count("WA")))
print("TLE x "+str(s.count("TLE")))
print("RE x "+str(s.count("RE")))
N = int(input())
S_list = []
for _ in range(N):
  S = str(input())
  S_list.append(S)
# print(S_list)
AC_list = [S == 'AC' for S in S_list]
WA_list = [S == 'WA' for S in S_list]
TLE_list = [S == 'TLE' for S in S_list]
RE_list = [S == 'RE' for S in S_list]
print('AC x {}'.format(sum(AC_list)))
print('WA x {}'.format(sum(WA_list)))
print('TLE x {}'.format(sum(TLE_list)))
print('RE x {}'.format(sum(RE_list)))
N = int(input())
Cac = 0
Cwa = 0
Ctle = 0
Cre = 0
for cnt in range(N):
    Si = input()
    if Si == 'AC':
        Cac = Cac + 1
    elif Si == 'WA':
        Cwa = Cwa + 1
    elif Si == 'TLE':
        Ctle = Ctle + 1
    elif Si == 'RE':
        Cre = Cre + 1

print('AC', 'x', Cac)
print('WA', 'x', Cwa)
print('TLE', 'x', Ctle)
print('RE', 'x', Cre)
# B

from collections import Counter

n = int(input())
s_c = Counter([input() for x in range(n)])

print("AC x",s_c["AC"])
print("WA x",s_c["WA"])
print("TLE x",s_c["TLE"])
print("RE x",s_c["RE"])
n = int(input())
x = list(range(n))
for i in range(n):
  x[i] = input()
c_0 = x.count("AC")
c_1 = x.count("WA")
c_2 = x.count("TLE")
c_3 = x.count("RE")
print("AC x {}".format(c_0))
print("WA x {}".format(c_1))
print("TLE x {}".format(c_2))
print("RE x {}".format(c_3))
import collections
n=int(input())
l=[]
for i in range(n):
  l.append(input())
c=collections.Counter(l)
for k in ['AC','WA','TLE','RE']:
  if k in c.keys():
    print(k+' x '+str(c[k]))
  else: print(k+' x '+str(0))
N = int(input())
dict = {}
dict['AC'] = 0
dict['WA'] = 0
dict['TLE'] = 0
dict['RE'] = 0

for i in range(N):
  s = input()
  dict[s] += 1
  
print('AC x',dict['AC'])
print('WA x',dict['WA'])
print('TLE x',dict['TLE'])
print('RE x',dict['RE'])
n = int(input());

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

ac = wa = tle = re = 0

for s_kind in s:
    if s_kind == "AC":
        ac += 1
    elif s_kind == "WA":
        wa += 1
    elif s_kind == "TLE":
        tle += 1
    elif s_kind == "RE":
        re += 1
    
print("AC x",ac)
print("WA x",wa)
print("TLE x",tle)
print("RE x",re)
n = int(input())
L = list(str(input()) for _ in range(n))
print('AC x', L.count('AC'))
print('WA x', L.count('WA'))
print('TLE x', L.count('TLE'))
print('RE x', L.count('RE'))
#B
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(f'AC x {AC}')
print(f'WA x {WA}')
print(f'TLE x {TLE}')
print(f'RE x {RE}')
dct = {
    'AC': 0,
    'WA': 0,
    'TLE': 0,
    'RE': 0,
}
N = int(input())
for i in range(N):
    S = input()
    dct[S] = dct[S] + 1

print('AC x %s' % dct['AC'])
print('WA x %s' % dct['WA'])
print('TLE x %s' % dct['TLE'])
print('RE x %s' % dct['RE'])
n = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for i in range(n):
  k = input().upper()
  if k == 'AC':
    ac +=1
  elif k == 'WA':
    wa +=1
  elif k == 'TLE':
    tle +=1
  elif k == 'RE':
    re +=1
    
print('{} x {}'.format('AC',ac))
print('{} x {}'.format('WA',wa))
print('{} x {}'.format('TLE',tle))
print('{} x {}'.format('RE',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 += 1;
    else :
        re += 1;

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

n = int(input())
KeyLst = ('AC','WA','TLE','RE')
resultLst = (str(input()) for _ in range(n))
countedDic = collections.Counter(resultLst)
for key in KeyLst:
  print('{} x {}'.format(key,countedDic[key]))
n = int(input())
d = {"AC":0, "WA":0, "TLE":0, "RE":0}
for _ in range(n):
    s = input()
    d[s] += 1

for s in ['AC', 'WA', 'TLE', 'RE']:
    print("{} x {}".format(s, d[s]))
from collections import Counter
N=int(input())
a=[]
for i in range(N):
  a.append(input())
c = Counter(a)

print("AC x "+str(a.count("AC")))
print("WA x "+str(a.count("WA")))
print("TLE x "+str(a.count("TLE")))
print("RE x "+str(a.count("RE")))
N = int(input())
result = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for i in range(N):
    S = input()
    result[S] += 1
print('AC x ' + str(result['AC']))
print('WA x ' + str(result['WA']))
print('TLE x ' + str(result['TLE']))
print('RE x ' + str(result['RE']))
N=int(input())
A=[0,0,0,0]
for i in range(N):
  a=input()
  if a=='AC':
    A[0]+=1
  elif a=='WA':
    A[1]+=1
  elif a=='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])
N = int(input())  # nは入力回数
S = [input() for _ in range(N)]

print("AC x "+str(S.count('AC')))
print("WA x "+str(S.count('WA')))
print("TLE x "+str(S.count('TLE')))
print("RE x "+str(S.count('RE')))
N=int(input())
AC=0
WA=0
TLE=0
RE=0
for i in range(N):
  IN=input()
  if IN=='AC':
    AC+=1
  if IN=='WA':
    WA+=1
  if IN=='TLE':
    TLE+=1
  if IN=='RE':
    RE+=1
print('AC x ',AC)
print('WA x ',WA)
print('TLE x ',TLE)
print('RE x ',RE)
N = int(input())
d = ('AC', 'WA', 'TLE', 'RE')
S = {k: 0 for k in d}

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

for k in d:
    print(f"{k} x {S[k]}")
N = int(input())
out = ["AC","WA","TLE","RE"]
output = [0]*4

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="")
#B - Judge Status Summary
N = int(input())
s =list(input() for i in range(N))
DP = [0]*4
for j in range(N):
    if s[j] == "AC":
        DP[0] += 1
    elif s[j] == "WA":
        DP[1] += 1
    elif s[j] == "TLE":
        DP[2] += 1
    else:
        DP[3] += 1

print("AC x",DP[0])
print("WA x",DP[1])
print("TLE x",DP[2])
print("RE x",DP[3])
n = input()
n = int(n)
ac = 0
wa = 0
tle = 0
re = 0
for i in range(n):
    wk = input()
    if wk == "AC":
        ac +=1
    elif wk == "WA":
        wa += 1
    elif wk == "TLE":
        tle += 1
    else :
        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))
a = int(input())
b = [input() for i in range(a)]
AC = 0
WA = 0
TLE = 0
RE = 0

for bun in b:
    if bun == 'AC':
        AC += 1
    elif bun == 'WA':
        WA += 1
    elif bun =='TLE':
        TLE += 1
    elif bun == 'RE':
        RE += 1

print('AC x ' + str(AC))
print('WA x ' + str(WA))
print('TLE x ' + str(TLE))
print('RE x ' + str(RE))
s = [input() for i in range(1)] 
s0 = int(s[0])
t = [input() for i in range(s0)]
ac_count=0
wa_count=0
tle_count=0
re_count=0

for j in range(s0):
    s1 = t[j]
    if s1 == "AC":
        ac_count+=1
    if s1 == "WA":
        wa_count+=1
    if s1 == "TLE":
        tle_count+=1
    if s1 == "RE":
        re_count+=1
print("AC x ",ac_count)
print("WA x ",wa_count)
print("TLE x ",tle_count)
print("RE x ",re_count)
N = int(input())
result = []
for i in range(0,(N)):
    A = input()
    if A:
        result.append(A)
AC = result.count("AC")
WA = result.count("WA")
TLE = result.count("TLE")
RE = result.count("RE")
print(f"AC x {AC}\nWA x {WA}\nTLE x {TLE}\nRE x {RE}\n")
N = int(input())
S =  {
  'AC': 0,
  'WA': 0,
  'TLE': 0,
  'RE': 0
}

for i in range(N):
  S[input()] += 1
  
for key in S.keys():
  print(key + " x " + str(S[key]))
N = int(input())
AC=0
WA=0
TLE=0
RE=0
for i in range(N):
  d = input()
  if d=="AC":
    AC+=1
  elif d=="WA":
    WA+=1
  elif d=="TLE":
    TLE+=1
  elif d=="RE":
    RE+=1
    
print("AC x", AC)
print("WA x", WA)
print("TLE x", TLE)
print("RE x", RE)
# B - Judge Status Summary
N = int(input())
dic = dict()

dic['AC'] = 0
dic['WA'] = 0
dic['TLE'] = 0
dic['RE'] = 0

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

for k, v in dic.items():
	print(k + ' x ' + str(v))
n=int(input())
s=[input() for i in range(n)]
print("AC x "+str(s.count("AC")))
print("WA x "+str(s.count("WA")))
print("TLE x "+str(s.count("TLE")))
print("RE x "+str(s.count("RE")))
n,*d = map(str, open(0).read().split())
AC,WA,TLE,RE=0,0,0,0

for i in range(int(n)):
    if d[i]=="AC":
        AC+=1
    if d[i]=="WA":
        WA+=1
    if d[i]=="TLE":
        TLE+=1
    if d[i]=="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
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(f'AC x {a}')
print(f'WA x {w}')
print(f'TLE x {t}')
print(f'RE x {r}')
a=int(input())
count1=0
count2=0
count3=0
count4=0
for i in range(a):
    b=str(input())
    count=0
    if b=='AC':
        count1+=1 
       
    if b=='RE':
        count2+=1 
       
    if b=='TLE':
        count3+=1 
       
    if b=='WA':
        count4+=1 
print('AC x ',end='')
print(count1)
print('WA x ',end='')
print(count4)
print('TLE x ',end='')
print(count3)
print('RE x ',end='')
print(count2)
import collections

def main():
    n = int(input())
    s_list = []
    for _ in range(n):
        s_list.append(input())
    c = collections.Counter(s_list)

    for result in ["AC", "WA", "TLE", "RE"]:
        print("{0} x {1}".format(result, c[result]))

if __name__ == "__main__":
    main()
N= int(input())
s = [input() for i in range(N)] 
C = [0,0,0,0]
for i in range(N):
    if s[i] == "AC":
        C[0] = C[0] + 1
    elif s[i] == "WA":
        C[1] = C[1] + 1
    elif s[i] == "TLE":
        C[2] = C[2] + 1
    else:
        C[3] = 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]))
n=int(input())
countlist={'AC':0,"WA":0,"TLE":0,"RE":0}
for i in range(n):
    i=input()
    if i =='AC':
        countlist['AC']+=1
    elif i == 'WA':
        countlist["WA"]+=1
    elif i == 'TLE':
        countlist["TLE"]+=1
    else:
        countlist["RE"]+=1

def main():
    for i in countlist:
        print('{0} x {1}'.format(i,countlist[i]))

main()
def main():
    import sys
    N=int(sys.stdin.readline())
    dic={
        'AC':0,
        'WA':0,
        'TLE':0,
        'RE':0,
    }
    for i in range(N):
        S=sys.stdin.readline()
        dic[S.strip()]+=1
    
    for key,val in dic.items():
        print('{} x {}'.format(key,val))

main()
import collections
n = int(input())
d = collections.defaultdict(int)
for i in range(n):
  d[str(input())] += 1
print(f"AC x {d['AC']}")
print(f"WA x {d['WA']}")
print(f"TLE x {d['TLE']}")
print(f"RE x {d['RE']}")
n = int(input())
lst = []

for i in range(n):
  lst.append(input())
  
print('AC x ' + str(lst.count('AC')))
print('WA x ' + str(lst.count('WA')))
print('TLE x ' + str(lst.count('TLE')))
print('RE x ' + str(lst.count('RE')))
N = int(input())
res = [0]*4
for i in range(N):
    s = input()
    if s == "AC":
        res[0] += 1
    elif s == "WA":
        res[1] += 1
    elif s == "TLE":
        res[2] += 1
    elif s == "RE":
        res[3] += 1

print(f"AC x {res[0]}")
print(f"WA x {res[1]}")
print(f"TLE x {res[2]}")
print(f"RE x {res[3]}")
from collections import Counter


def read_int():
    return int(input().strip())


def read_ints():
    return list(map(int, input().strip().split(' ')))


def solve():
    N = read_int()
    counter = Counter()
    for _ in range(N):
        counter[input().strip()] += 1
    for verdict in ['AC', 'WA', 'TLE', 'RE']:
        print(f'{verdict} x {counter[verdict]}')


if __name__ == '__main__':
    solve()
N=int(input())
l=[]
for i in range(N):
  a=input()
  l.append(a)
AC_num=l.count("AC")
WA_num=l.count("WA")
TLE_num=l.count("TLE")
RE_num=l.count("RE")
print("AC x",AC_num)
print("WA x",WA_num)
print("TLE x",TLE_num)
print("RE x",RE_num)
N = int(input())
test = [input() for i in range(N)]
dicts = {"AC":0, "WA":0, "TLE":0, "RE":0 }
for i in test:
  dicts[i] += 1
for i in dicts:
  print(i,"x",dicts[i])
ac = 0
wa = 0
tle = 0
re = 0
n = int(input())

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

print ("AC x " + str(ac) + "\n" + "WA x " + str(wa) + "\n" + "TLE x " + str(tle) + "\n" + "RE x " + str(re))
#!python3

import sys
iim = lambda: map(int, sys.stdin.readline().rstrip().split())
from collections import Counter

def resolve():
    it = iter(sys.stdin.read().split())
    N = int(next(it))
    cc = Counter(it)

    for s in ["AC", "WA", "TLE", "RE"]:
        print(f"{s} x {cc[s]}")

if __name__ == "__main__":
    resolve()
N = int(input())

c = [0, 0, 0, 0]

for query 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 x " + str(c[0]))
print("WA x " + str(c[1]))
print("TLE x " + str(c[2]))
print("RE x " + str(c[3]))
N=int(input())
strings={"AC":0,"WA":0,"TLE":0,"RE":0}
for i in range(N):
    x=input()
    strings[x]+=1

for i in strings:
    print(i," x ",strings[i])
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

n = int(input())
_ac = 0
_wa = 0
_tle = 0
_re = 0

for _ in range(n):
    word = input()
    if word in 'AC':
        _ac += 1
        continue
    elif word in 'WA':
        _wa += 1
        continue
    elif word in 'TLE':
        _tle += 1
        continue
    elif word in 'RE':
        _re += 1
        continue


print('AC x ' + str(_ac))
print('WA x ' + str(_wa))
print('TLE x ' + str(_tle))
print('RE x ' + str(_re))
#[int(i) for i in input().split()]
import collections
n = int(input())
dic = collections.defaultdict(int)
for i in range(n):
  dic[input()] += 1
print("AC x " + str(dic["AC"]))
print("WA x " + str(dic["WA"]))
print("TLE x " + str(dic["TLE"]))
print("RE x " + str(dic["RE"]))
n=int(input())
li=[input() for i in range(n)]
ans=[0,0,0,0]
for i in range(n):
    if li[i]=="AC":
        ans[0]+=1
    elif li[i]=="WA":
        ans[1]+=1
    elif li[i]=="TLE":
        ans[2]+=1
    elif li[i]=="RE":
        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=int(input())
AC=int(0)
WA=int(0)
TLE=int(0)
RE=int(0)
for i in range(N):
    inp=input()
    if inp=="AC":
        AC+=1
    if inp=="WA":
        WA+=1
    if inp=="TLE":
        TLE+=1
    if inp=="RE":
        RE+=1

print("AC x",AC)
print("WA x",WA)
print("TLE x",TLE)
print("RE x",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 "+str(c0))
print("WA x "+str(c1))
print("TLE x "+str(c2))
print("RE x "+str(c3))
N = int(input())
str = [input() for _ in range(N)]

print("AC x %d" % str.count("AC"))
print("WA x %d" % str.count("WA"))
print("TLE x %d" % str.count("TLE"))
print("RE x %d" % str.count("RE"))
import sys
input = sys.stdin.readline
 
N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
 
for _ in range(N):
  str1 = input()
  if str1[0] == 'A':
    AC += 1
  elif str1[0] == 'W':
    WA += 1
  elif str1[0] == 'T':
    TLE += 1
  elif str1[0] == 'R':
    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 as dd
d = dd(int)
for _ in range(int(input())):
    s = input()
    d[s]+=1
print (('AC x '), end = '')
print (d['AC'])
print (('WA x '), end = '')
print (d['WA'])
print (('TLE x '), end = '')
print (d['TLE'])
print (('RE x '), end = '')
print (d['RE'])
N=int(input())
S=[]
for i in range(0, N):
    val = input()
    S.append(val)
ac=S.count('AC')
wa=S.count('WA')
tle=S.count('TLE')
re=S.count('RE')

print("AC x ", end='') 
print(ac)
print("WA x ", end='') 
print(wa)
print("TLE x ", end='') 
print(tle)
print("RE x ", end='') 
print(re)
n=int(input())
AC="AC"
WA="WA"
TLE="TLE"
RE="RE"
lst = [str(input()) for _ in range(n)]
print(f"{AC} x {lst.count(AC)}")
print(f"{WA} x {lst.count(WA)}")
print(f"{TLE} x {lst.count(TLE)}")
print(f"{RE} x {lst.count(RE)}")
d = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
for i in range(int(input())): d[input()]+=1
for i in d: print(i+' x', d[i])
from collections import defaultdict
new = defaultdict(int)
for i in range(int(input())):
    s = input()
    new[s] += 1
print("AC x "+str(new['AC']))
print("WA x "+str(new['WA']))
print("TLE x "+str(new['TLE']))
print("RE x "+str(new['RE']))
n = int(input())
s = [input() for i in range(n)]

print("AC x "+str(s.count("AC")))
print("WA x "+str(s.count("WA")))
print("TLE x "+str(s.count("TLE")))
print("RE x "+str(s.count("RE")))
#-*- using:utf-8 -*-

N = int(input())
C = [0,0,0,0]
for _ in range(N):
    a = str(input())
    if(a == "AC"):
        C[0] += 1
    elif(a == "WA"):
        C[1] += 1
    elif(a == "TLE"):
        C[2] += 1
    elif(a == "RE"):
        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]))
N=int(input())
S=[]
for _ in range(N):
  s=input()
  S.append(s)
  
C0=S.count("AC")
C1=S.count("WA")
C2=S.count("TLE")
C3=S.count("RE")

ans=[C0,C1,C2,C3]
moji=["AC","WA","TLE"," RE"]

for i in range(4):
    print(moji[i]+" x "+str(ans[i]))
N=int(input())
D={"AC":0,"WA":0,"TLE":0,"RE":0}
for i in range(N):
    D[input()]+=1
X=["AC","WA","TLE","RE"]
for s in X:
    print("{0} x {1}".format(s,D[s]))
import collections
import sys
input = sys.stdin.readline

def main():
    N = int(input())
    S = [input().rstrip() for _ in range(N)]
    c = collections.Counter(S)
    for tc in ["AC", "WA", "TLE", "RE"]:
        if tc in c:
            print("{} x {}".format(tc, c[tc]))
        else:
            print("{} x 0".format(tc))


if __name__ == '__main__':
    main()