peterverebics/CodeNet_Python_118 huggingface dataset:
n=int(input())
ac=0
wa=0
tle=0
re=0
for _ 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 {0}'.format(ac))
print('WA x {0}'.format(wa))
print('TLE x {0}'.format(tle))
print('RE x {0}'.format(re))
n = int(input())

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

for i in range(0, n):
  s = input()
  if s == 'AC':
    ac_count += 1
  elif s == 'WA':
    wa_count += 1
  elif s == 'TLE':
    tle_count += 1
  else:
    re_count += 1

print('AC x ' + str(ac_count))
print('WA x ' + str(wa_count))
print('TLE x ' + str(tle_count))
print('RE x ' + str(re_count))
n = int(input())
a = []
for _ in range(n):
    a.append(input())
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())
S = []
C = [0,0,0,0]

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

for n in range(N):
    if S[n] == "AC":
        C[0] += 1
    elif S[n] == "WA":
        C[1] += 1
    elif S[n] == "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())
s = [input() for _ in range(n)]

t = ('AC', 'WA', 'TLE', 'RE')
for i in t:
    print(i, 'x', s.count(i))
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())
a,b,c,d = 0,0,0,0
for i in range(n):
    tmp = input()
    if tmp == 'AC':
        a += 1
    if tmp == 'WA':
        b += 1
    if tmp == 'TLE':
        c += 1
    if tmp == 'RE':
        d += 1
print('AC x ',a)
print('WA x ',b)
print('TLE x ',c)
print('RE x ',d)
N = int(input())
results = [input() for i in range(N)]

counts = {
    'AC': 0,
    'WA': 0,
    'TLE': 0,
    'RE': 0,
}
for result in results:
    if result == 'AC':
        counts['AC'] += 1
    elif result == 'WA':
        counts['WA'] += 1
    elif result == 'TLE':
        counts['TLE'] += 1
    elif result == 'RE':
        counts['RE'] += 1
answer = '''
AC x {}
WA x {}
TLE x {}
RE x {}
'''.format(counts['AC'], counts['WA'], counts['TLE'], counts['RE'])
print(answer)
from collections import Counter

N = int(input())
S = [None] * N
for i in range(N):
    s = input()
    S[i] = s

counter = Counter(S)

cases = ["AC", "WA", "TLE", "RE"]
for case in cases:
    if case in counter:
        print(f"{case} x {counter[case]}")
    else:
        print(f"{case} x 0")
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())
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)]

kind = ["AC","WA","TLE","RE"]
d = defaultdict(int)
for i in range(N):
    d[S[i]] += 1

for i in range(len(kind)):
    print("{} x {}".format(kind[i],d[kind[i]]))
n = int(input())
l = [input() for i in range(n)]
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())
AC,WA,TLE,RE = 0,0,0,0

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

print('AC x ' + str(AC))
print('WA x ' + str(WA))
print('TLE x ' + str(TLE))
print('RE x ' + str(RE))
N=int(input())
L=list()
for i in range(N):
  L.append(input())
a=L.count('AC')
b=L.count('WA')
c=L.count('TLE')
d=L.count('RE')
print('AC x',a)
print('WA x',b)
print('TLE x',c)
print('RE x',d)
n = int(input())
s = [input() for i in range(n)]
for v in ["AC","WA","TLE","RE"]:
    print('{0} x {1}'.format(v,s.count(v)))
rows = int(input())
x = [input() for i in range(rows)]
print("AC x {}".format(x.count('AC')))
print("WA x {}".format(x.count('WA')))
print("TLE x {}".format(x.count('TLE')))
print("RE x {}".format(x.count('RE')))
N = int(input())
S = [0]*N
AC = 0
WA = 0
TLE = 0
RE = 0

for n in range(N):
  S[n] = str(input())
  if S[n] == "AC":
    AC = AC + 1
  elif S[n] == "WA":
    WA = WA + 1
  elif S[n] == "TLE":
    TLE = TLE + 1
  elif S[n] == "RE":
    RE = RE + 1
    
print("AC x {}\nWA x {}\nTLE x {}\nRE x {}".format(AC,WA,TLE,RE))
N = input()
n = int(N)

jugde = []
for i in range(n):
  s = input()
  jugde.append(s)
  
print('AC x',jugde.count('AC'))
print('WA x',jugde.count('WA'))
print('TLE x',jugde.count('TLE'))
print('RE x',jugde.count('RE'))
#!/usr/bin/env python3
n,*s=open(0).read().split()
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())
c1=c2=c3=c4=0
for i in range(n):
 x=input()
 if x=="AC":
  c1+=1
 elif x=="WA":
  c2+=1
 elif x=="TLE":
  c3+=1
 elif x=="RE":
  c4+=1
print("AC x "+str(c1))
print("WA x "+str(c2))
print("TLE x "+str(c3))
print("RE x "+str(c4))
n = int(input())
lst = []
for i in range(n):
    m = input()
    lst.append(m)

print("AC x",lst.count("AC"))
print("WA x",lst.count("WA"))
print("TLE x",lst.count("TLE"))
print("RE x",lst.count("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
    elif  tmp == 'RE':
        re+=1
    else:
        continue
print('AC x '+str(ac))
print('WA x '+str(wa))
print('TLE x '+str(tle))
print('RE x '+str(re))
n = int(input())
d = {}
d['AC'] = 0
d['WA'] = 0
d['TLE'] = 0
d['RE'] = 0

for _ in range(n):
	s = input()
	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())
A = [input() for i in range(N)]
print("AC x",A.count("AC"))
print("WA x",A.count("WA"))
print("TLE x",A.count("TLE"))
print("RE x",A.count("RE"))
from collections import Counter
n = int(input().strip())
L = [input().strip() for _ in range(n)]


cnt=Counter(L)
for x in ["AC", "WA", "TLE", "RE"]:
    print(x+" x "+str(cnt[x]))
from sys import stdin, stdout
import sys
INF=1e11
import bisect
def get_int(): return int(stdin.readline().strip())
def get_ints(): return map(int,stdin.readline().strip().split()) 
def get_array(): return list(map(int,stdin.readline().strip().split()))
def get_string(): return stdin.readline().strip()
def op(c): return stdout.write(c)
from collections import defaultdict 
import math
d={"AC":0,"WA":0,"TLE":0,"RE":0}
for _ in range(int(stdin.readline())):
    d[get_string()]+=1
for x in d:
    print(x,"x",d[x])
n = int(input())
first_list = ['AC', 'WA', 'TLE', 'RE']
list = []
for _ in range(n):
    list.append(input())

for i in first_list:
    print(i, 'x', list.count(i))
N = int(input())
S = [input() for _ in range(N)]
d = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
for s in S:
    d[s] += 1
for k, v in d.items():
    print(f"{k} x {v}")
N = int(input())
S = [input() for i in range(N)]
ac = 0
wa = 0 
tle = 0
re = 0
for n in range(N):
    if S[n] == "AC" :
        ac = ac + 1
    elif S[n] == "WA" :
        wa = wa + 1
    elif S[n] == "TLE" :
        tle = tle + 1
    elif S[n] == "RE" :
        re = re + 1

ans1 = "AC x  " + str(ac)
ans2 = "WA x  " + str(wa)
ans3 = "TLE x  " + str(tle)
ans4 = "RE x  " + str(re)

print(ans1)
print(ans2)
print(ans3)
print(ans4)
N=int(input())
s=[]
for i in range(N):
    s.append(input())

aa=["AC","WA","TLE","RE"]
for a in aa:
    print("{} x {}".format(a,str(s.count(a))))
def main():
    N=int(input())
    dic={"AC":0,"WA":0,"TLE":0,"RE":0}
    for _ in range(N):
        s=input()
        dic[s]+=1
        
    for i in dic:
        print("{0} x {1}".format(i,str(dic[i])))
        
    
    
main()
number = int(input())
 
ac = 0
wa = 0
tle = 0
re = 0
for i in range(number):
  character = input()
  if character == 'AC':
    ac += 1
  if character == 'WA':
    wa += 1
  if character == 'TLE':
    tle += 1
  if character == '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 i in range(n):
	s.append(input())
a=0
b=0
c=0
d=0
for i in range(n):
	if s[i]=="AC":
		a+=1
	elif s[i]=="WA":
		b+=1
	elif s[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=str(input())
    if s=="AC" :
        ac=ac+1
    elif s=="WA" :
        wa=wa+1
    elif s=="TLE" :
        tle=tle+1
    else :
        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 n 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)
import collections
n = int(input())
s = [input() for _ in range(n)]
s = collections.Counter(s)
print("AC x " + str(s["AC"]))
print("WA x " + str(s["WA"]))
print("TLE x " + str(s["TLE"]))
print("RE x " + str(s["RE"]))
n = int(input())
sss = [input() for _ in range(n)]
cnt_AC=0
cnt_WA=0
cnt_TLE=0
cnt_RE=0

for i in sss:
    if i == "AC":
        cnt_AC +=1
    if i == "WA":
        cnt_WA +=1
    if i == "TLE":
        cnt_TLE +=1
    if i == "RE":
        cnt_RE +=1

print("AC x", cnt_AC)
print("WA x", cnt_WA)
print("TLE x", cnt_TLE)
print("RE x", cnt_RE)
N = int(input())
S = [input() for i 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

print('AC x ' + str(ac))
print('WA x ' + str(wa))
print('TLE x ' + str(tle))
print('RE x ' + str(re))
N = int(input())
A = [input() for _ in range(N)]
count = [0] * 4
for a in A:
  if a == 'AC':
    count[0] += 1
  elif a == 'WA':
    count[1] += 1
  elif a == 'TLE':
    count[2] += 1
  else:
    count[3] += 1

print(f"AC x {count[0]}")
print(f"WA x {count[1]}")
print(f"TLE x {count[2]}")
print(f"RE x {count[3]}")
ans = {
  'AC' : 0,
  'WA' : 0,
  'TLE' : 0,
  'RE' : 0
}

for i in range(int(input())):
  ans[input()]+=1
               
for k, v in ans.items():
  print(f'{k} x {v}')
from collections import Counter

N = int(input())
S = [input() for _ in range(N)]

S_counter = Counter(S)

print('AC x {}'.format(S_counter.get('AC', 0)))
print('WA x {}'.format(S_counter.get('WA', 0)))
print('TLE x {}'.format(S_counter.get('TLE', 0)))
print('RE x {}'.format(S_counter.get('RE', 0)))
n = int(input())

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

for i in range(n):
    s = input()
    if "AC" == s:
        ac += 1
    elif "WA" == s:
        wa += 1
    elif "TLE" == s:
        tle += 1
    elif "RE" == s:
        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())
C = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
for i in range(N):
    c = input()
    if c == "AC":
        C["AC"] += 1
    elif c == "WA":
        C["WA"] += 1
    elif c == "RE":
        C["RE"] += 1
    else:
        C["TLE"] += 1
print("AC x", C["AC"])
print("WA x", C["WA"])
print("TLE x", C["TLE"])
print("RE x", C["RE"])
from collections import Counter
N = int(input())
S = [input() for _ in range(N)]
C = Counter(S)
print('AC x ', end='')
print(C['AC'])
print('WA x ', end='')
print(C['WA'])
print('TLE x ', end='')
print(C['TLE'])
print('RE x ', end='')
print(C['RE'])
# coding: utf-8
n = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(n):
    judge = input()
    if judge == "AC":
        AC += 1
    elif judge == "WA":
        WA += 1
    elif judge == "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())

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

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

for s in res:
    print(s + " x " + str(res[s]))
N = int(input())
ac = 0
wa = 0
tle = 0
re = 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 ' + str(ac))
print('WA x ' + str(wa))
print('TLE x ' + str(tle))
print('RE x ' + str(re))
#dt = {} for i in x: dt[i] = dt.get(i,0)+1
import sys;input = sys.stdin.readline
inp,ip = lambda :int(input()),lambda :[int(w) for w in input().split()]

dt = {'AC':0,'WA':0,'TLE':0,'RE':0}
for _ in range(inp()):
    s = input().strip()
    dt[s] += 1
for i in ['AC','WA','TLE','RE']:
    print(i,'x',dt[i])
import sys
n = int(input())
a = []
for l in sys.stdin:
    a.append(l.replace('\n',''))
    
def count(a,str):
  return len([i for i in a if i ==str])

print(f'AC x {count(a,"AC")}')
print(f'WA x {count(a,"WA")}')
print(f'TLE x {count(a,"TLE")}')
print(f'RE x {count(a,"RE")}')
n = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0

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

print("AC x",AC)
print("WA x",WA)
print("TLE x",TLE)
print("RE x",RE)
n=int(input())
a=0
b=0
c=0
d=0
for i in range(n):
  w=input()
  if w=="AC":
    a=a+1
  elif w=="TLE":
    b=b+1
  elif w=="WA":
    c=c+1
  else:
    d=d+1
print("AC "+"x "+str(a))
print("WA "+"x "+str(c))
print("TLE "+"x "+str(b))
print("RE "+"x "+str(d))
n=int(input())
ans={"AC":0,"WA":0,"TLE":0,"RE":0}
for i in range(n):
  res = input()
  ans[res] += 1
for i in ["AC","WA","TLE","RE"]:
  print(i,"x",ans[i])
N = int(input())
s = list(input() for _ in range(N))
cntlst = ['AC', 'WA', 'TLE', 'RE']

for i in cntlst:
    print(i, 'x', s.count(i))
N=int(input())
s=[input()  for i in range(N)]
for v in ['AC', 'WA', 'TLE','RE']:
  print('{0} x {1}'.format(v,s.count(v)))
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", ac)
print("WA x", wa)
print("TLE x", tle)
print("RE x", re)
ans = {
    'AC' : 0,
    'WA' : 0,
    'TLE' : 0,
    'RE' : 0
}

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

for k, v in ans.items():
    print(k, 'x', v)
N = int(input())

data = [input() for _ in range(N)]

def f(s):
  c = len([x for x in data if x in s])
  print(f"{s} x {c}")
  
f("AC")
f("WA")
f("TLE")
f("RE")
N = int(input())
S = []
for row in range(N):
    S.append(str(input()))

nAC = S.count('AC')
nWA = S.count('WA')
nTLE = S.count('TLE')
nRE = S.count('RE')

print('AC x', int(nAC))
print('WA x', int(nWA))
print('TLE x', int(nTLE))
print('RE x', int(nRE))
import bisect,collections,copy,heapq,itertools,math,string
import numpy as np
import sys
sys.setrecursionlimit(10**7)

def _S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

N = I()
# 頻度 counter
S = [_S() for _ in range(N)]
c = collections.Counter(S)

judge = ['AC', 'WA', 'TLE', 'RE']
for j in judge:
    print(j + ' x ' + str(c[j]))
n = int(raw_input())

t = ['AC', 'WA', 'TLE', 'RE']
d = {}
for _ in xrange(n):
    s = raw_input()
    d[s] = d.get(s, 0) + 1
for k in t:
    print '%s x %d' % (k, d.get(k, 0))
n = int(input())
cnt = [0, 0, 0, 0]
for i in range(n):
    result = str(input())
    if result == 'AC':
        cnt[0] += 1
    elif result == 'WA':
        cnt[1] += 1
    elif result == 'TLE':
        cnt[2] += 1
    else:
        cnt[3] += 1
print('AC x', cnt[0])
print('WA x', cnt[1])
print('TLE x', cnt[2])
print('RE x', cnt[3])
from collections import Counter
n=int(input())
A=[input().strip() for _ in range(n)]
C=Counter(A)
for s in ['AC', 'WA', 'TLE', 'RE']:
    print(s+' x '+str(C[s]))
mp1 = {}
mp2 = {}
cnt = [0] * 4

mp1['AC'] = 0
mp1['WA'] = 1
mp1['TLE'] = 2
mp1['RE'] = 3

mp2[0] = 'AC'
mp2[1] = 'WA'
mp2[2] = 'TLE'
mp2[3] = 'RE'

n = int(input())

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

for i in range(4):
	print(mp2[i], 'x', cnt[i])
import sys
import numpy as np  # noqa

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines


N = int(readline())

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

for i in range(N):
    s = readline().rstrip().decode()
    if s == "AC":
        AC += 1
    elif s == "WA":
        WA += 1
    elif s == "TLE":
        TLE += 1
    elif s == "RE":
        RE += 1

print(f"AC x {AC}")
print(f"WA x {WA}")
print(f"TLE x {TLE}")
print(f"RE x {RE}")
import sys

N = int(sys.stdin.readline().strip())
ans = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
for _ in range(N):
    s = sys.stdin.readline().strip()
    ans[s] += 1

for key, value in ans.items():
    print(key + " x " + str(value))
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 {}".format(ac))
print("WA x {}".format(wa))
print("TLE x {}".format(tle))
print("RE x {}".format(re))
n = int(input())
l = []
for _ in range(n):
    l.append(input()) # l += [input()]でもOK
#rint(l)

ac,wa,tle,re = 0,0,0,0
for i in l:
    if i == 'AC':
        ac += 1
    elif i == 'WA':
        wa += 1
    elif i =='TLE':
        tle += 1
    elif i == 'RE':
        re += 1

print('AC x',ac)
print('WA x',wa)
print('TLE x',tle)
print('RE x',re)
from collections import Counter

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

cntr = dict(Counter(lis))

for key in ['AC', 'WA', 'TLE', 'RE']:
    print(key, 'x', cntr.get(key, 0))
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
ac=str(ac)
wa=str(wa)
tle=str(tle)
re=str(re)
print("AC x "+ ac +"")
print("WA x "+ wa +"")
print("TLE x "+ tle +"")
print("RE x "+ re +"")
N = int(input())
d = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}

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

for k in d:
  print(k + " x " + str(d[k]))
import sys
input=lambda: sys.stdin.readline().rstrip()
n=int(input())
import collections
D=collections.defaultdict(int)
for _ in range(n):
  D[input()]+=1
A=["AC","WA","TLE","RE"]
for a in A:
  print(a+" x "+str(D[a]))
d={"AC":0, "WA":0, "TLE":0, "RE":0}
n = int(input())
for i in range(n):
    a = input()
    d[a]+=1
print("AC","x",d["AC"])
print("WA","x",d["WA"])
print("TLE","x",d["TLE"])
print("RE","x",d["RE"])
import collections as cl

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

c = cl.Counter(S_list)

print("AC x " + str(c["AC"]))
print("WA x " + str(c["WA"]))
print("TLE x " + str(c["TLE"]))
print("RE x " + str(c["RE"]))
# じょえチャンネルおもしろいよ～～～
# https://www.youtube.com/channel/UCRXsI3FL_kvaVL9zoolBfbQ

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())
c_AC = 0
c_WA = 0
c_TLE = 0
c_RE = 0
for _ in range(N):
    X = input()
    if X == "AC":
        c_AC += 1
    if X == "WA":
        c_WA += 1
    if X == "TLE":
        c_TLE += 1 
    if X == "RE":
        c_RE += 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))
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
from collections import Counter 
def main():
    N = int(input())
    s = []
    for _ in range(N):
        s.append(input())
    dd = Counter(s)
    print('AC x ' + str(dd['AC']))
    print('WA x ' + str(dd['WA']))
    print('TLE x ' + str(dd['TLE']))
    print('RE x ' + str(dd['RE']))
if __name__ == '__main__':
    main()
n = int(input())
results = [input() for i in range(n)]

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

for i in results:
  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())
S = [input() for i in range(N)]
AC = 0
WA = 0
TLE = 0
RE = 0

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

a = "AC x " + str(AC)
b = "WA x " + str(WA)
c = "TLE x " + str(TLE)
d = "RE x " + str(RE)

print(a)
print(b)
print(c)
print(d)
N = int(input())
a = 0
w = 0
t = 0
r = 0
for i in range(N):
    x = input()
    if x == "AC":
        a += 1
    elif x == "WA":
        w += 1
    elif x == "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())
from collections import defaultdict
dic=defaultdict(int)
for _ 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"]))
import sys
import math
import bisect

def main():
    d = dict()
    for _ in range(int(input())):
        s = input()
        if s not in d:
            d[s] = 0
        d[s] += 1
    A = ['AC', 'WA', 'TLE', 'RE']
    for a in A:
        if a not in d:
            d[a] = 0
        print('%s x %d' % (a, d[a]))

if __name__ == "__main__":
    main()
n = int(input())
s = [input() for i in range(n)]
AC = 0
WA = 0
TLE = 0
RE = 0
for t in s:
    if (t == 'AC'):
        AC += 1
    elif (t == 'WA'):
        WA += 1
    elif (t == '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())
S = []
for _ in range(N):
  s = input()
  S.append(s)
kekka = [0,0,0,0]
for s in S:
  if s=='AC':
    kekka[0] += 1
  if s=='WA':
    kekka[1] += 1
  if s=='TLE':
    kekka[2] += 1
  if s=='RE':
    kekka[3] += 1
judge = ['AC','WA','TLE','RE']
for i in range(4):
  print(judge[i],'x',kekka[i])
def resolve():
  N = int(input())
  result = {
    'AC': 0,
    'WA': 0, 
    'TLE': 0,
    'RE': 0
  }
  for i in range(N):
    result[input()] += 1
  print('AC x', result['AC'])
  print('WA x', result['WA'])
  print('TLE x', result['TLE'])
  print('RE x', result['RE'])

if __name__ == "__main__":
  resolve()
import sys
INF = 1 << 60
MOD = 10**9 + 7 # 998244353
sys.setrecursionlimit(2147483647)
input = lambda:sys.stdin.readline().rstrip()
def resolve():
    states = ["AC", "WA", "TLE", "RE"]
    counts = [0] * 4
    for _ in range(int(input())):
        counts[states.index(input())] += 1

    for state, count in zip(states, counts):
        print("%s x %s" % (state, count))
resolve()
N = int(input())

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

for i in range(1, N+1) :
    s = input()
    if s == 'AC' :
        c0 = c0 + 1
    elif s == 'WA' :
        c1 = c1 + 1
    elif s == 'TLE' :
        c2 = c2 + 1
    elif s == 'RE' :
        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())
C0 = 0
C1 = 0
C2 = 0
C3 = 0

for i in range(N):
    a = input()
    if a == 'AC':
        C0 += 1
    if a == 'WA':
        C1 += 1
    if a == 'TLE':
        C2 += 1
    if a == 'RE':
        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())
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 {}".format(AC))
print("WA x {}".format(WA))
print("TLE x {}".format(TLE))
print("RE x {}".format(RE))
t=int(input())
f=[]
for i in range(t):
    s=input()
    f.append(s)
print("AC"+' '+'x'+' '+str((f.count("AC"))))
print("WA"+' '+'x'+' '+str((f.count("WA"))))
print("TLE"+' '+'x'+' '+str((f.count("TLE"))))
print("RE"+' '+'x'+' '+str((f.count("RE"))))