peterverebics/CodeNet_Python_118 huggingface dataset:
n = int(input())

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

for k, v in d.items():
    print(f'{k} x {v}')
n = int(input())
l = [0] * 4

for i in range(n):
    ans = input()
    if ans == 'AC':
        l[0] += 1
    elif ans == 'WA':
        l[1] += 1
    elif ans == 'TLE':
        l[2] += 1
    elif ans == 'RE':
        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())
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 x', AC)
print('WA x', WA)
print('TLE x', TLE)
print('RE x', RE)
n = int(input())
S = [input() for _ in range(n)]

num_ac, num_wa, num_tle, num_re = 0, 0, 0, 0

for s in S:
    if s == 'AC':
        num_ac += 1
    elif s == 'WA':
        num_wa += 1
    elif s == 'TLE':
        num_tle += 1
    else:
        num_re += 1

print(f'AC x {num_ac}')
print(f'WA x {num_wa}')
print(f'TLE x {num_tle}')
print(f'RE x {num_re}')
N = int(input())
result = [0] * 4
for _ in range(N):
    S = input()
    if S == 'AC':
        result[0] += 1
    elif S == 'WA':
        result[1] += 1
    elif S == 'TLE':
        result[2] += 1
    elif S == 'RE':
        result[3] += 1
        
print('AC x {}'.format(result[0]))
print('WA x {}'.format(result[1]))
print('TLE x {}'.format(result[2]))
print('RE x {}'.format(result[3]))
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 x',ac)
print('WA x',wa)
print('TLE x',tle)
print('RE x',re)
a = []
N = int(input())
for i in range(N):
   s = input()
   a.append(s)

print("AC x {}".format(a.count("AC")))
print("WA x {}".format(a.count("WA")))
print("TLE x {}".format(a.count("TLE")))
print("RE x {}".format(a.count("RE")))
n = int(input()) #1行目のNを取得する
#print(n)
ac = 0
wa = 0
tle = 0
re = 0
for i in range(n):
  x = input()
  #print(x,i)
  if x == 'AC':
    ac +=1
  if x == 'WA':
    wa +=1
  if x == 'TLE':
    tle +=1
  if x == 'RE':
    re +=1
print('AC x',ac)
print('WA x',wa)
print('TLE x',tle)
print('RE x',re)
n=int(input())
rst=['AC','WA','TLE','RE']
cnt=[0,0,0,0]
for i in range(0,n):
    a=input()
    for j in range(0,4):
        if a==rst[j]:
            cnt[j]=cnt[j]+1
            break

for i in range(0,4):
    print(rst[i]," x ",cnt[i])
def main():
    num = int(input())
    inputlist = [input() for i in range(num)]
    print("AC x ", inputlist.count("AC"))
    print("WA x ", inputlist.count("WA"))
    print("TLE x ", inputlist.count("TLE"))
    print("RE x ", inputlist.count("RE"))


if __name__ == '__main__':
    main()
# -*- coding: utf-8 -*-
n = int(input())
S = []
for i in range(n):
    s = input()
    S.append(s)
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,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 x "+str(ac))
print("WA x "+str(wa))
print("TLE x "+str(tle))
print("RE x "+str(re))
n = int(input())
sdic = {"AC":0,"WA":0,"TLE":0,"RE":0}
for i in range(n):
    s = input()
    sdic[s] += 1
ac = str(sdic["AC"])
print("AC x "+ac)
wa = str(sdic["WA"])
print("WA x "+wa)
tle = str(sdic["TLE"])
print("TLE x "+tle)
re = str(sdic["RE"])
print("RE x "+re)
N=int(input())
result=[]

import collections

for _ in range(N):
    s=input()
    result.append(s)

R=collections.Counter(result)

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

print("AC x " + str(S.count('AC')))
print("WA x " + str(S.count('WA')))
print("TLE x " + str(S.count('TLE')))
print("RE x " + str(S.count('RE')))
s = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for i in range(1,s+1):
    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())

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

for i in range(N):
    s = input()
    ans[s] += 1

for s in ["AC", "WA", "TLE", "RE"]:
    print(s, " x ", ans[s])
from collections import Counter
n = int(input())
s = [input() for _ in range(n)]

count = Counter(s)
m = ["AC","WA","TLE","RE"]
for i in m:
  print(i,"x",count[i])
N = int(input())

l = []
for i in range(N):
    S = input()
    l.append(S)
    
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')))
n = int(input())

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

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

print("AC x", c["AC"])
print("WA x", c["WA"])
print("TLE x", c["TLE"])
print("RE x", c["RE"])
ls = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
n = int(input())
for i in range(n):
    s = input()
    ls[s] += 1
for result in ls:
    print("{} x {}".format(result, ls[result]))
dic = {"AC":0, "WA":0, "TLE":0, "RE":0}
N = int(input())

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

for k in dic.keys():
    print(f"{k} x {dic[k]}")
from collections import Counter
n=int(input())
L=[input() for i in range(n)]
LC=Counter(L)

A=['AC', 'WA', 'TLE', 'RE']
for a in A:
    if a in LC.keys():
        print(a+' x '+str(LC[a]))
    else:
        print(a+' x '+'0')
N = int(input())
C0, C1, C2, C3 = 0, 0, 0, 0
for i in range(N):
    Si = input()
    if Si == 'AC':
        C0 = C0+1
 
    elif Si == 'WA':
        C1  =C1+1
 
    elif Si == 'TLE':
        C2  =C2+1
 
    else:
        C3  =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):
    case = input()
    if case == "AC":
        ac += 1
    elif case == "WA":
        wa += 1
    elif case == "TLE":
        tle += 1
    else:
        re += 1
print("AC x"+" "+str(ac),sep=" ")
print("WA x"+" "+str(wa),sep=" ")
print("TLE x"+" "+str(tle),sep=" ")
print("RE x"+" "+str(re),sep=" ")
n = int(input())
s = []
ac = 0
wa = 0
tle = 0
re = 0
for _ in range(n):
    s.append(input())
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',ac)
print('WA x',wa)
print('TLE x',tle)
print('RE x',re)
import math
import collections
import fractions
import itertools
import functools
import operator

def solve():
    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")))
    return 0

if __name__ == "__main__":
    solve()
N=int(input())
S=[]
for i in range(N):
    S.append(input())
    
for i in ['AC', 'WA','TLE','RE']:
    print(i+' '+'x'+' '+str(S.count(i)))
N = int(input())
S = [input() for i in range(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))
if __name__ == '__main__':
    N = int(input())
    DIC = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
    for _ in range(N):
        S = input()
        DIC[S] += 1

    for k, v in DIC.items():
        print(f'{k} x {v}')
# coding: utf-8
case=int(input())
results=[input() for i in range(case)]

numAC=results.count('AC')
numWA=results.count('WA')
numTLE=results.count('TLE')
numRE=results.count('RE')

print('AC x ' + str(numAC))
print('WA x ' + str(numWA))
print('TLE x ' + str(numTLE))
print('RE x ' + str(numRE))
N = int(input())

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

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

for j in list:
  if j == 'AC':
    C0 = C0 + 1
  elif j == 'WA':
    C1 = C1 + 1
  elif j == 'TLE':
    C2 = C2 + 1
  elif j == 'RE':
    C3 = C3 + 1
    
print('AC x %d' % C0)
print('WA x %d' % C1)
print('TLE x %d' % C2)
print('RE x %d' % C3)
dict={"AC":0,"WA":0,"TLE":0,"RE":0}
n,*s=map(str,open(0).read().split())
for i in s:
  dict[i]+=1
for k, v in dict.items(): 
  print(k+" x "+str(v))
import sys
import math
def get_array(): return list(map(int, sys.stdin.readline().strip().split()))
def get_ints(): return map(int, sys.stdin.readline().strip().split())
def input(): return sys.stdin.readline().strip()
n=int(input())
count=0
flag=0
tag=0
bsdk=0
for i in range(n):
    s=input()
    if s=="AC":
        count=count+1
    elif s=="WA":
        flag=flag+1
    elif s=="TLE":
        tag=tag+1
    else:
        bsdk=bsdk+1
print("AC x",count)
print("WA x",flag)
print("TLE x",tag)
print("RE x",bsdk)
import collections
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
n=int(readline())
s=read().rstrip().decode().split()
c=collections.Counter(s)
for x in ["AC","WA","TLE","RE"]:
    n=c[x]
    print("{} x {}".format(x, n))
N = int(input())
S = [input() for i 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
    elif S[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())
ac,wa,tle,re = 0,0,0,0
for i in range(n):
  s = str(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)
num = int(input())
ac = 0
tle = 0
wa = 0
re = 0

for i in range(num):
  word = input()
  if word == "AC":
    ac += 1
  if word == "TLE":
    tle += 1
  if word == "WA":
    wa += 1
  if word == "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 = {"AC":0, "WA":0, "TLE":0, "RE":0}
for i in range(N):
    S[input()] += 1

print("AC x",S["AC"])
print("WA x",S["WA"])
print("TLE x",S["TLE"])
print("RE x",S["RE"])
from heapq import *
import sys
from collections import *
from itertools import *
from decimal import *
import copy
from bisect import *
import math
sys.setrecursionlimit(4100000)
def gcd(a,b):
    if(a%b==0):return(b)
    return (gcd(b,a%b))
input=lambda :sys.stdin.readline().rstrip()
N=int(input())
S=[input() for i in range(N)]
S=Counter(S)

for s in ["AC","WA","TLE","RE"]:
    print(s,"x",S[s])
n = int(input())
s = [0, 0, 0, 0]

for i in range(n):
    st = input()
    if st == 'AC':
        s[0] += 1
    elif st == 'WA':
        s[1] += 1
    elif st == 'TLE':
        s[2] += 1
    else:
        s[3] += 1

print('AC x '+str(s[0]))
print('WA x '+str(s[1]))
print('TLE x '+str(s[2]))
print('RE x '+str(s[3]))
import collections
N=int(input())
c=collections.Counter()
for i in range(N):
    t=input()
    c[t]+=1
print('AC x {}'.format(c['AC']))
print('WA x {}'.format(c['WA']))
print('TLE x {}'.format(c['TLE']))
print('RE x {}'.format(c['RE']))
ac=0
wa=0
tle=0
re=0
for _ in range(int(input())):
  a=input()
  if(a=="AC"):
   	ac+=1
  elif(a=="WA"):
    wa+=1
  elif(a=="TLE"):
    tle+=1
  else:
    re+=1
print("AC x",ac)
print("WA x",wa)
print("TLE x",tle)
print("RE x",re)
#!/usr/bin/env python3
import sys
input = sys.stdin.readline

n = int(input())
ac = 0; wa = 0; tle = 0; re = 0
for _ in range(n):
    s = input().rstrip()
    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)
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))
N, *S = open(0).read().split()
d = {
    'AC': 0,
    'WA': 0,
    'TLE': 0,
    'RE': 0,
}
for s in S:
    if s in d:
        d[s] += 1
print('AC x', d['AC'])
print('WA x', d['WA'])
print('TLE x', d['TLE'])
print('RE x', d['RE'])
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())
a=0;w=0;r=0;tl=0
for _ in range(n):
  t=input()
  if(t=='AC'):
    a +=1
  elif(t=='WA'):
    w +=1
  elif(t=='RE'):
    r +=1
  elif(t=='TLE'):
    tl +=1
print('AC x '+str(a))
print('WA x '+str(w))
print('TLE x '+str(tl))
print('RE x '+str(r))
N=int(input())
ans=[0,0,0,0]
for _ in range(N):
  result=input()
  for i in range(4):
    if result==["AC","WA","TLE","RE"][i]:
      ans[i]+=1
      break
for i in range(4):
  print(["AC","WA","TLE","RE"][i]+" x "+str(ans[i]))
import collections
 
judgement = []
while True:
  try:
    judgement.append(input())
  except:
    break
 
counter = collections.Counter(judgement)
 
n_ac = counter.get('AC', 0)
n_wa = counter.get('WA', 0)
n_tle = counter.get('TLE', 0)
n_re = counter.get('RE', 0)
 
print('AC x {}'.format(n_ac))
print('WA x {}'.format(n_wa))
print('TLE x {}'.format(n_tle))
print('RE x {}'.format(n_re))
n = int(input())
d={}
for i in range(n):
	s= input()
	d[s] = d.get(s,0)+1
for s in ("AC","WA","TLE","RE"):
	print(s,"x",d.get(s,0))
N = int(input())
count = [0,0,0,0]
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
    elif s == 'RE':
        count[3] += 1
    else:
        continue
print('AC x ' + str(count[0]))
print('WA x ' + str(count[1]))
print('TLE x ' + str(count[2]))
print('RE x ' + str(count[3]))
#!/usr/bin/python
# -*- coding: utf-8 -*-

import numpy as np

def int_mtx(N):
    x = []
    for _ in range(N):
        x.append(input())
    return np.array(x)

N = int(input())
S = int_mtx(N)

acc = np.count_nonzero(S == "AC")
wac = np.count_nonzero(S == "WA")
tlec = np.count_nonzero(S == "TLE")
rec = np.count_nonzero(S == "RE")

print("AC x "+str(acc))
print("WA x "+str(wac))
print("TLE x "+str(tlec))
print("RE x "+str(rec))
from collections import Counter
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')
n = I()
d = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for _ in range(n):
    s = S()
    d[s] += 1
for k, v in d.items():
    print(f'{k} x {v}')
import sys
import collections

def main():
    n = int(input())
    s = collections.Counter([i.rstrip() for i in sys.stdin.readlines()])
    for x in ["AC", "WA", "TLE", "RE"]:
        print(x, "x", s[x])

if __name__ == "__main__":
    main()
n=int(input())
l=[]
for i in range(n):
    a=input()
    l.append(a)
print('AC x ',l.count('AC'))
print('WA x ',l.count('WA'))
print('TLE x ',l.count('TLE'))
print('RE x ',l.count('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())

lists = [0]*4
for i in range(N):
  s = input()
  if "AC"==s:
    lists[0] += 1
  elif "WA"==s:
    lists[1] += 1
  elif "TLE"==s:
    lists[2] += 1
  else:
    lists[3] += 1

print("AC x {}".format(lists[0]))
print("WA x {}".format(lists[1]))
print("TLE x {}".format(lists[2]))
print("RE x {}".format(lists[3]))
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 x '+str(a))
print('WA x '+str(w))
print('TLE x '+str(t))
print('RE x '+str(r))
N = int(input())
a = 0
w = 0
t = 0
r = 0
S = []
for _ in range(N):
    S.append(str(input()))

for s in S:
    if s == 'AC':
        a += 1
    elif s == 'WA':
        w += 1
    elif s == 'TLE':
        t += 1
    else:
        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())
d = {"AC":0, "WA":0, "TLE":0, "RE":0}
for _ in range(N):
    d[input()] += 1

for k, v in d.items():
    print("{} x {}".format(k, v))
n = int(input())
s = [list( input().split() ) for i in range(n)]
c = [0, 0, 0, 0]

for i in range(n):
  if s[i] == ['AC']:
    c[0] += 1
  if s[i] == ['WA']:
    c[1] += 1
  if s[i] == ['TLE']:
    c[2] += 1
  if s[i] == ['RE']:
    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())
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 x "+str(ac))
print("WA x "+str(wa))
print("TLE x "+str(tle))
print("RE x "+str(re))
n = int(input())

kekka = ["AC","WA","TLE","RE"]
ans = [0]*4

for _ in range(n):
    s = input()

    if s == kekka[0]:
        ans[0] += 1
    elif s == kekka[1]:
        ans[1] += 1
    elif s == kekka[2]:
        ans[2] += 1
    elif s == kekka[3]:
        ans[3] += 1

for i in range(4):
    print(kekka[i]+" x ",end="")
    print(ans[i])
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())
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())
sum=[0]*4
for i in range(n):
    a=input()
    if a=='AC':
        sum[0]=sum[0]+1
    elif a=='WA':
        sum[1]=sum[1]+1
    elif a=='TLE':
        sum[2]=sum[2]+1
    elif a=='RE':
        sum[3]=sum[3]+1

print('AC x ',sum[0])
print('WA x ',sum[1])
print('TLE x ',sum[2])
print('RE x ',sum[3])
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())
d={'AC':0,'WA':0,'TLE':0,'RE':0}
for _ in range(N):
    d[input()]+=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']))
N = int(input())
dic = {}
dic['AC'] = 0
dic['WA'] = 0
dic['TLE'] = 0
dic['RE'] = 0
for i in range(N):
  s = input().strip()
  dic[s] += 1
print("AC x ",end = '')
print(dic['AC'])
print("WA x ",end = '')
print(dic['WA'])
print("TLE x ",end = '')
print(dic['TLE'])
print("RE x ",end = '')
print(dic['RE'])
n = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(0, n):
    case = str(input())
    if case == "AC":
        AC = AC+1
    elif case == "WA":
        WA = WA+1
    elif case == "TLE":
        TLE = TLE+1
    elif case == "RE": 
        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))
n = int(input())
a_dist = {'AC' : 0, 'WA' : 0, 'TLE' : 0, 'RE' : 0}
for i in range(n):
  a = input()
  a_dist[a] = a_dist[a] + 1
for a, a_n in a_dist.items():
  print(f'{a} x {a_n}')
N = int(input())
S=[]
for i in range(N):
  s=input()
  S.append(s)
  
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")))
r = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
for _ in range(int(input())):
    r[input()] += 1
else:
    for key in r.keys():
        print(f"{key} x {r[key]}")
N = int(input())
dic = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
for _ in range(N):
    S = input()
    dic[S] += 1
for k, v in dic.items():
    print(k, "x", v)
import sys
import numpy as np

read = sys.stdin.read

n = int(input())
s = np.array(read().split(), dtype=object)

print("AC x ",end='')
print(np.count_nonzero(s=="AC"))
print("WA x ",end='')
print(np.count_nonzero(s=="WA"))
print("TLE x ",end='')
print(np.count_nonzero(s=="TLE"))
print("RE x ",end='')
print(np.count_nonzero(s=="RE"))
from collections import defaultdict
N = int(input())
c = defaultdict(int)
for i in range(N):
    s = input().strip()
    c[s] += 1

print("AC x", c["AC"])
print("WA x", c["WA"])
print("TLE x", c["TLE"])
print("RE x", c["RE"])
N = int(input())
Ss = [input() for _ in range(N)]

import collections

c = collections.Counter(Ss)
print(c)
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())
d=dict() 
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 ×",end=" ")
print(d["AC"])
print("WA ×",end=" ")
print(d["WA"])
print("TLE ×",end=" ")
print(d["TLE"]) 
print("RE ×",end=" ") 
print(d["RE"])
N = int(input())
S = []
count_AC = 0
count_WA = 0
count_TLE = 0
count_RE = 0
for _ in range(N):
  S.append(input())
for i in S:
  if i == "AC":
    count_AC += 1  
  elif i == "WA":
    count_WA += 1    
  elif i == "TLE":
    count_TLE += 1
  elif i == "RE":
    count_RE += 1
  else:
    pass
a = "AC" + "x" + str(count_AC)
b = "WA" + "x" + str(count_WA)
c = "TLE" + "x" + str(count_TLE)
d = "RE" + "x" + str(count_RE)
print(a, b, c, d, sep="\n")
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 * {}".format(a))
print("WA * {}".format(b))
print("TLE * {}".format(c))
print("RE * {}".format(d))
from collections import defaultdict
def main():
    N = int(input())
    c = defaultdict(int)

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

    print("AC × {}".format(c["AC"]))
    print("WA × {}".format(c["WA"]))
    print("TLE × {}".format(c["TLE"]))
    print("RE × {}".format(c["RE"]))

if __name__ == "__main__":
    main()
def main():
    import collections
    n = int(input())
    mylist = []
    for i in range(n):
        s = input()
        mylist.append(s)
    c = collections.Counter(mylist)
    print('AC × ' + str(c['AC']))
    print('WA × ' + str(c['WA']))
    print('TLE × ' + str(c['TLE']))
    print('RE × ' + str(c['RE']))
if __name__ == "__main__":
    main()
N = int(input())
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 ×',wa)
print('TLE ×',tle)
print('RE ×',re)
N = int(input())

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

# a, t, w, r = 0, 0, 0, 0

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

print("AC × {}\nTLE × {}\nWA × {}\nRE × {}".format(s_list["AC"], s_list["TLE"], s_list["WA"], s_list["RE"]))
N = int(input())

ACcount = 0 
WAcount = 0
TLEcount = 0
REcount = 0
for i in range(N):
	S=input()

	if S == "AC":
		ACcount = ACcount + 1
	elif S == "WA":
		WAcount = WAcount + 1
	elif S == "TLE":
		TLEcount = TLEcount + 1
	elif S == "RE":
		REcount = REcount + 1

print("AC x　" + str(ACcount))
print("WA x　" + str(WAcount))
print("TLE x　" + str(TLEcount))
print("RE x　" + str(REcount))
N = int(input())
S = list(input().split())

print(f'AC x {S.count("AC")}')
print(f'WA x {S.count("WA")}')
print(f'TLE x {S.count("TLE")}')
print(f'RE x {S.count("RE")}')