Takahashi is participating in a programming contest called AXC002, and he has just submitted his code to Problem A.
The problem has N test cases.
For each test case i (1\leq i \leq N), you are given a string S_i representing the verdict for that test case. Find the numbers of test cases for which the verdict is AC, WA, TLE, and RE, respectively.
See the Output section for the output format.

-----Constraints-----
 - 1 \leq N \leq 10^5
 - S_i is AC, WA, TLE, or RE.

-----Input-----
Input is given from Standard Input in the following format:
N
S_1
\vdots
S_N

-----Output-----
Let C_0, C_1, C_2, and C_3 be the numbers of test cases for which the verdict is AC, WA, TLE, and RE, respectively. Print the following:
AC x C_0
WA x C_1
TLE x C_2
RE x C_3

-----Sample Input-----
6
AC
TLE
AC
AC
WA
TLE

-----Sample Output-----
AC x 3
WA x 1
TLE x 2
RE x 0

We have 3, 1, 2, and 0 test case(s) for which the verdict is AC, WA, TLE, and RE, respectively.

Difficulty: EASY

Solutions:
n = int(input())
j = [0] * 4
moji = ['AC', 'WA', 'TLE', 'RE']
for i in range(n):
	s = input()
	if s == 'AC':
		j[0] += 1
	elif s == 'WA':
		j[1] += 1
	elif s == 'TLE':
		j[2] += 1
	elif s == 'RE':
		j[3] += 1
for k in range(4):
	print(f'{moji[k]} x {j[k]}')


(_, *s) = map(str, open(0).read().split())
c = ['AC', 'WA', 'TLE', 'RE']
for i in range(4):
	print(c[i] + ' x ' + str(s.count(c[i])))


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


k = ['AC', 'WA', 'TLE', 'RE']
n = int(input())
ans = {}
for _ in range(n):
	r = input()
	ans[r] = ans.get(r, 0) + 1
for r in k:
	print(r, 'x', ans.get(r, 0))


(_, *l) = open(0).read().split()
for j in ('AC', 'WA', 'TLE', 'RE'):
	print(j, 'x', l.count(j))


n = int(input())
d = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for i in range(n):
	s = str(input())
	d[s] += 1
for i in d.keys():
	print(i + ' x ' + str(d[i]))


n = int(input())
a = [input() for i in range(n)]
for v in ['AC', 'WA', 'TLE', 'RE']:
	print(f'{v} x {a.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
	else:
		RE += 1
print('AC x {}'.format(AC))
print('WA x {}'.format(WA))
print('TLE x {}'.format(TLE))
print('RE x {}'.format(RE))


import sys
input()
d = {k: 0 for k in 'AC WA TLE RE'.split()}
for ln in sys.stdin:
	d[ln.strip()] += 1
for (k, v) in d.items():
	print(k, 'x', v)


n = int(input())
s = []
for i 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 i in range(N)]
for v in ['AC', 'WA', 'TLE', 'RE']:
	print('{} x {}'.format(v, s.count(v)))


g = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for i in range(int(input())):
	g[input()] += 1
for i in g:
	print(i + ' x ' + str(g[i]))


N = int(input())
S = [input() for _ in range(N)]
ls = ['AC', 'WA', 'TLE', 'RE']
for i in range(4):
	print('{} x {}'.format(ls[i], S.count(ls[i])))


n = int(input())
l = [input() for i in range(n)]
reslt = ['AC', 'WA', 'TLE', 'RE']
for j in reslt:
	print('{0} x {1}'.format(j, l.count(j)))


n = int(input())
l = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for _ in range(n):
	l[input()] += 1
for k in l.keys():
	print(k + ' x ' + str(l[k]))


n = int(input())
C = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for i in range(n):
	C[input()] += 1
for s in C:
	print(f'{s} x {C[s]}')


n = int(input())
acc = 0
wac = 0
tlec = 0
rec = 0
for i in range(n):
	s = input()
	if s == 'AC':
		acc += 1
	elif s == 'WA':
		wac += 1
	elif s == 'TLE':
		tlec += 1
	elif s == 'RE':
		rec += 1
print('AC x %d' % acc)
print('WA x %d' % wac)
print('TLE x %d' % tlec)
print('RE x %d' % rec)


a = int(input())
b = [input() for i in range(a)]
c = ['AC', 'WA', 'TLE', 'RE']
for d in c:
	print(f'{d} x {b.count(d)}')


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_list = [input() for i in range(N)]
ac = S_list.count('AC')
wa = S_list.count('WA')
tle = S_list.count('TLE')
re = S_list.count('RE')
print(f'AC x {ac}')
print(f'WA x {wa}')
print(f'TLE x {tle}')
print(f'RE x {re}')


N = int(input())
string = ['AC', 'WA', 'TLE', 'RE']
count = [0] * 4
for i in range(N):
	s = input()
	if s == 'AC':
		count[0] = count[0] + 1
	elif s == 'WA':
		count[1] = count[1] + 1
	elif s == 'TLE':
		count[2] = count[2] + 1
	else:
		count[3] = count[3] + 1
for j in range(len(count)):
	print(string[j] + ' x ' + str(count[j]))


status = ['AC', 'WA', 'TLE', 'RE']
li = []
N = int(input())
for n in range(N):
	li.append(input())
for s in status:
	print(s, 'x', li.count(s))


N = int(input())
list = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
l = [input() for i in range(N)]
for i in list:
	print('{0} x {1}'.format(i, l.count(i)))


n = int(input())
S = list((input() for _ in range(n)))
for i in ['AC', 'WA', 'TLE', 'RE']:
	print(i + ' x ' + str(S.count(i)))


s = [input() for _ in range(int(input()))]
l = ['AC', 'WA', 'TLE', 'RE']
for i in l:
	print(i, 'x', s.count(i))


N = int(input())
C0 = C1 = C2 = C3 = 0
for i in range(N):
	S = str(input())
	if S == 'AC':
		C0 += 1
	if S == 'WA':
		C1 += 1
	if S == 'TLE':
		C2 += 1
	if S == 'RE':
		C3 += 1
C0 = str(C0)
C1 = str(C1)
C2 = str(C2)
C3 = str(C3)
print('AC x ' + C0)
print('WA x ' + C1)
print('TLE x ' + C2)
print('RE x ' + C3)


N = int(input())
state = [input() for _ in range(N)]
for k in ['AC', 'WA', 'TLE', 'RE']:
	print('{0} x {1}'.format(k, state.count(k)))


dic = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
t = int(input())
for i in range(t):
	dic[input()] += 1
for (key, val) in dic.items():
	print(key + ' x ' + str(val))


N = int(input())
D = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for i in range(N):
	D[input()] += 1
for (x, y) in list(D.items()):
	print('{0} x {1}'.format(x, y))


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


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}')


l = []
for i in range(int(input())):
	l.append(input())
for x in ['AC', 'WA', 'TLE', 'RE']:
	print(x + ' x ' + str(l.count(x)))


N = int(input())
S = list((input() for i in range(N)))
Result = ['AC', 'WA', 'TLE', 'RE']
for i in Result:
	print(i, 'x', S.count(i))


N = int(input())
S = [input() for i in range(N)]
for item in ['AC', 'WA', 'TLE', 'RE']:
	print('{} x {}'.format(item, S.count(item)))


N = int(input())
C = 0
D = 0
E = 0
F = 0
S = ''
for i in range(N):
	S = input()
	if S == 'AC':
		C += 1
	elif S == 'WA':
		D += 1
	elif S == 'TLE':
		E += 1
	elif S == 'RE':
		F += 1
print('AC x ' + str(C), 'WA x ' + str(D), 'TLE x ' + str(E), 'RE x ' + str(F), sep='\n')


N = int(input())
S = [input() for _ in range(N)]
for j in ['AC', 'WA', 'TLE', 'RE']:
	print(f'{j} x {S.count(j)}')


n = int(input())
s = [input() for i in range(n)]
(ac, wa, tle, re) = (0, 0, 0, 0)
for s_e in s:
	if s_e == 'AC':
		ac += 1
	elif s_e == 'WA':
		wa += 1
	elif s_e == 'TLE':
		tle += 1
	elif s_e == 'RE':
		re += 1
print(f'AC x {ac}')
print(f'WA x {wa}')
print(f'TLE x {tle}')
print(f'RE x {re}')


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


n = int(input())
x = ['AC', 'WA', 'TLE', 'RE']
y = [input() for _i in range(n)]
for i in x:
	print(i, 'x', y.count(i))


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(k, 'x', v)


n = int(input())
d = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for i in range(n):
	d[input()] += 1
for (k, v) in d.items():
	print(k, 'x', v)


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


N = int(input())
s = [input() for i in range(N)]
for j in ('AC', 'WA', 'TLE', 'RE'):
	print(j, 'x', s.count(j))


N = int(input())
S = list((input() for _ in range(N)))
J = ['AC', 'WA', 'TLE', 'RE']
for judge in J:
	print(judge + ' x ' + str(S.count(judge)))


dic = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
N = int(input())
for i in range(N):
	dic[input()] += 1
for i in dic:
	print(i, 'x', dic[i])


r = {i: 0 for i in ['AC', 'WA', 'TLE', 'RE']}
for _ in range(int(input())):
	s = input()
	r[s] += 1
for i in ['AC', 'WA', 'TLE', 'RE']:
	print(i, 'x', r[i])


def main():
	N = int(input())
	result = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
	for i in range(N):
		result[input()] += 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']))
main()


(n, *s) = open(0).read().split()
for t in ['AC', 'WA', 'TLE', 'RE']:
	print(f'{t} x {s.count(t)}')


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


a = int(input())
b = [input() for i in range(a)]
c = ['AC', 'WA', 'TLE', 'RE']
for value in c:
	print('{0} x {1}'.format(value, b.count(value)))


N = int(input())
S = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for _ in range(N):
	s = input()
	S[s] += 1
for (k, v) in S.items():
	print(k + ' x ' + str(v))


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


n = int(input())
l = ['AC', 'WA', 'TLE', 'RE']
c = [input() for _ in range(n)]
for k in l:
	print(k, 'x', c.count(k))


n = int(input())
s = [input() for _ in range(n)]
res = ['AC', 'WA', 'TLE', 'RE']
for r in res:
	print(r, 'x', s.count(r))


N = int(input())
S = [input() for _ in range(N)]
for r in ['AC', 'WA', 'TLE', 'RE']:
	print('{} x {}'.format(r, S.count(r)))


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 = int(input())
li = [input() for i in range(n)]
ac = 0
wa = 0
tle = 0
re = 0
for i in li:
	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)


a = int(input())
b = [input() for i in range(a)]
c = ['AC', 'WA', 'TLE', 'RE']
for i in c:
	print(i + str(' x ') + str(b.count(i)))


n = int(input())
S = [input() for i in range(n)]
scores = ['AC', 'WA', 'TLE', 'RE']
for score in scores:
	print(f'{score} x {S.count(score)}')


from collections import Counter
C = Counter((input() for _ in range(int(input()))))
for w in 'AC WA TLE RE'.split():
	print(w, 'x', C[w])


n = int(input())
s = [input() for i in range(n)]
x = ['AC', 'WA', 'TLE', 'RE']
for i in x:
	print('{} x '.format(i) + str(s.count(i)))


n = int(input())
ans = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for i in range(n):
	ans[input()] += 1
for key in ans:
	print(key, 'x', ans[key])


n = int(input())
a = [0] * 4
b = ['AC', 'WA', 'TLE', 'RE']
for i in range(n):
	s = input()
	for j in range(4):
		if s == b[j]:
			a[j] += 1
for i in range(4):
	print(b[i] + ' x ' + str(a[i]))


from collections import defaultdict
kero = ['AC', 'WA', 'TLE', 'RE']
tanuki = defaultdict(int)
n = int(input())
s = [input() for i in range(n)]
for res in s:
	tanuki[res] += 1
for k in kero:
	print(f'{k} x {tanuki[k]}')


count = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for i in range(int(input())):
	x = str(input())
	if x in count:
		count[x] += 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']))


N = int(input())
S = [input() for _ in range(N)]
for x in ['AC', 'WA', 'TLE', 'RE']:
	print(x + ' x ' + str(S.count(x)))


N = int(input())
D = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for _ in range(N):
	S = input()
	D[S] += 1
for (i, x) in D.items():
	print(i + ' x ' + str(x))


n = int(input())
judge_list = [input() for i in range(n)]
ac_n = judge_list.count('AC')
tle_n = judge_list.count('TLE')
wa_n = judge_list.count('WA')
re_n = judge_list.count('RE')
print(f'AC x {ac_n}')
print(f'WA x {wa_n}')
print(f'TLE x {tle_n}')
print(f'RE x {re_n}')


from typing import List

def answer(n: int, s: List[str]) -> List[str]:
	result = []
	judges = ['AC', 'WA', 'TLE', 'RE']
	for i in judges:
		result.append(f'{i} x {s.count(i)}')
	return result

def main():
	(n, *s) = open(0).read().split()
	for i in answer(n, s):
		print(i)

def __starting_point():
	main()
__starting_point()


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 {}'.format(ac))
print('WA x {}'.format(wa))
print('TLE x {}'.format(tle))
print('RE x {}'.format(re))


N = int(input())
ans_ac = 0
ans_wa = 0
ans_tle = 0
ans_re = 0
for i in range(N):
	S = input()
	if S == 'AC':
		ans_ac += 1
	elif S == 'WA':
		ans_wa += 1
	elif S == 'TLE':
		ans_tle += 1
	else:
		ans_re += 1
print('AC', 'x', ans_ac)
print('WA', 'x', ans_wa)
print('TLE', 'x', ans_tle)
print('RE', 'x', ans_re)


(n, *s) = open(0).read().split()
from collections import Counter
c = Counter(s)
for ch in ['AC', 'WA', 'TLE', 'RE']:
	print(f'{ch} x {c[ch]}')


dic = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
S = int(input())
for i in range(S):
	B = input()
	dic[B] += 1
for item in dic:
	print(item, 'x', dic[item])


N = int(input())
s = [input() for v in range(N)]
for v in ['AC', 'WA', 'TLE', 'RE']:
	print('{0} x {1}'.format(v, s.count(v)))


L = []
for i in range(int(input())):
	L.append(input())
for j in ['AC', 'WA', 'TLE', 'RE']:
	print(j, 'x', L.count(j))


N = int(input())
arr = [input() for i in range(N)]
for t in ['AC', 'WA', 'TLE', 'RE']:
	print(f'{t} x {arr.count(t)}')


n = int(input())
a = [input() for _ in range(n)]
for s in ['AC', 'WA', 'TLE', 'RE']:
	print(s, 'x', a.count(s))


n = int(input())
tab = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for i in range(n):
	tab[input()] += 1
for i in tab:
	print(i, 'x', tab[i])


n = int(input())
s = [input() for i in range(n)]
print(*['{} x {}'.format(k, s.count(k)) for k in ['AC', 'WA', 'TLE', 'RE']], sep='\n')


n = int(input())
s = ['AC', 'WA', 'TLE', 'RE']
c = [0] * 4
for _ in range(n):
	c[s.index(input())] += 1
for (s1, c1) in zip(s, c):
	print(f'{s1} x {c1}')


import collections
n = int(input())
s = [input() for _ in range(n)]
c = collections.Counter(s)
for i in ['AC', 'WA', 'TLE', 'RE']:
	print(f'{i} x {c[i]}')


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


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


from collections import Counter
ans = Counter((input() for _ in range(int(input()))))
for i in ['AC', 'WA', 'TLE', 'RE']:
	print(f'{i} x {ans[i]}')


N = int(input())
d = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for _ in range(N):
	d[input()] += 1
for (i, v) in d.items():
	print(f'{i} x {v}')


n = int(input())
s = [input() for i in range(n)]
numAC = 0
numWA = 0
numTLE = 0
numRE = 0
for i in range(len(s)):
	if s[i] == 'AC':
		numAC += 1
	elif s[i] == 'WA':
		numWA += 1
	elif s[i] == 'TLE':
		numTLE += 1
	elif s[i] == 'RE':
		numRE += 1
	else:
		continue
print('AC x {}\nWA x {}\nTLE x {}\nRE x {}'.format(numAC, numWA, numTLE, numRE))


N = int(input())
S = [input() for i in range(N)]
for k in ['AC', 'WA', 'TLE', 'RE']:
	print(f'{k} x {S.count(k)}')


n = int(input())
l = [input() for i in range(n)]
for i in ['AC', 'WA', 'TLE', 'RE']:
	print(i, 'x', l.count(i))


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
	elif S == 'RE':
		RE += 1
print('AC x {}\nWA x {}\nTLE x {}\nRE x {}\n'.format(AC, WA, TLE, RE))


c = int(input())
r = ['AC', 'WA', 'TLE', 'RE']
a = {i: 0 for i in r}
for i in range(c):
	s = input()
	a[s] += 1
for rr in r:
	print(rr + ' x ' + str(a[rr]))


s = open(0).read().count
for r in ('AC', 'WA', 'TLE', 'RE'):
	print(r, 'x', s(r))


N = int(input())
d = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for _ in range(N):
	Si = input()
	d[Si] += 1
for k in d:
	print('{} x {}'.format(k, d[k]))


N = int(input())
result = []
for i in range(N):
	r = input()
	result.append(r)
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(N):
	if result[i] == 'AC':
		AC += 1
	if result[i] == 'WA':
		WA += 1
	if result[i] == 'TLE':
		TLE += 1
	if result[i] == 'RE':
		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.append(input())
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(f'AC x {AC}')
print(f'WA x {WA}')
print(f'TLE x {TLE}')
print(f'RE x {RE}')


n = int(input())
s = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for _ in range(n):
	key = str(input())
	s[key] += 1
for (k, v) in s.items():
	print('{} x {}'.format(k, v))


import collections
n = int(input())
res = [input() for i in range(n)]
a = collections.Counter(res)
print('{} x {}'.format('AC', a['AC']))
print('{} x {}'.format('WA', a['WA']))
print('{} x {}'.format('TLE', a['TLE']))
print('{} x {}'.format('RE', a['RE']))


N = int(input())
S = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for i in range(N):
	S[input()] += 1
for a in S:
	print(a + ' x ' + str(S[a]))


N = int(input())
S = [input() for i in range(N)]
A = 0
W = 0
T = 0
R = 0
for i in range(len(S)):
	if S[i] == 'AC':
		A += 1
	elif S[i] == 'WA':
		W += 1
	elif S[i] == '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())
count = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for n in range(N):
	count[input()] += 1
for i in count:
	print(i, 'x', count[i])


count = int(input())
lists = []
for i in range(count):
	new = input()
	lists.append(new)
ac_count = lists.count('AC')
wa_count = lists.count('WA')
tle_count = lists.count('TLE')
re_count = lists.count('RE')
print('AC x ' + str(ac_count))
print('WA x ' + str(wa_count))
print('TLE x ' + str(tle_count))
print('RE x ' + str(re_count))


from collections import *
N = int(input())
S = Counter([input() for _ in range(N)])
a = ['AC', 'WA', 'TLE', 'RE']
[print(x + ' x ' + str(S[x])) for x in a]


N = int(input())
j = [input() for i in range(N)]
import collections
c = collections.Counter(j)
cs = c['AC']
ca = c['WA']
cb = c['TLE']
cc = c['RE']
print(f'AC x {cs}')
print(f'WA x {ca}')
print(f'TLE x {cb}')
print(f'RE x {cc}')


n = int(input())
judge = ['AC', 'WA', 'TLE', 'RE']
cnt = [0] * 4
for _ in range(n):
	s = input()
	cnt[judge.index(s)] += 1
for i in range(4):
	print(judge[i], 'x', cnt[i])


n = int(input())
s = [input() for i in range(n)]
z = ['AC', 'WA', 'TLE', 'RE']
for j in z:
	print(j + ' x ' + str(s.count(j)))


n = int(input())
s = [input() for _ in range(n)]
for key in ('AC', 'WA', 'TLE', 'RE'):
	print('{} x {}'.format(key, s.count(key)))


buf = {}
for _ in range(int(input())):
	x = input()
	buf[x] = buf.get(x, 0) + 1
for x in ('AC', 'WA', 'TLE', 'RE'):
	print(x, 'x', buf.get(x, 0))


N = int(input().split()[0])
a = [0, 0, 0, 0]
for i in range(N):
	b = input().split()[0]
	if b == 'AC':
		a[0] += 1
	elif b == 'WA':
		a[1] += 1
	elif b == 'TLE':
		a[2] += 1
	elif b == 'RE':
		a[3] += 1
print('AC x {0}\nWA x {1}\nTLE x {2}\nRE x {3}'.format(a[0], a[1], a[2], a[3]))


(i, l, L) = (input, [], ['AC', 'WA', 'TLE', 'RE'])
n = int(i())
for x in range(0, n):
	l.append(i())
for x in L:
	print(f'{x} x {l.count(x)}')


t = int(input())
d = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
while t:
	d[input()] += 1
	t -= 1
for i in d:
	print(i, 'x', d[i])


def main():
	n = int(input())
	s = [input().rstrip('\r') for i in range(n)]
	li = ['AC', 'WA', 'TLE', 'RE']
	cnt = 0
	for i in range(len(li)):
		for j in s:
			if li[i] == j:
				cnt += 1
		print(li[i] + ' x ' + str(cnt))
		cnt = 0

def __starting_point():
	main()
__starting_point()


n = int(input())
v = [input() for i in range(n)]
for i in ['AC', 'WA', 'TLE', 'RE']:
	print('{} x {}'.format(i, v.count(i)))


n = int(input())
(a, w, t, r) = (0, 0, 0, 0)
for i in range(n):
	g = input()
	if g == 'AC':
		a += 1
	if g == 'WA':
		w += 1
	if g == 'TLE':
		t += 1
	if g == '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 = []
for i in range(n):
	S.append(input())
for t in ['AC', 'WA', 'TLE', 'RE']:
	print(f'{t} x {S.count(t)}')


n = int(input())
l = [input() for i in range(n)]
reslt = ['AC', 'WA', 'TLE', 'RE']
for j in range(4):
	print(reslt[j], 'x', l.count(reslt[j]))


N = int(input())
S = [input() for X in range(0, N)]
for T in ['AC', 'WA', 'TLE', 'RE']:
	print('{0} x {1}'.format(T, S.count(T)))


mp = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for _ in range(int(input())):
	mp[input()] += 1
for (i, k) in mp.items():
	print(i, 'x', k)


N = int(input())
ans = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for i in range(N):
	ans[input()] += 1
for (k, v) in ans.items():
	print('{} x {}'.format(k, v))


def ans173(N: int, S: list):
	return f"AC x {S.count('AC')}\nWA x {S.count('WA')}\nTLE x {S.count('TLE')}\nRE x {S.count('RE')}"
N = int(input())
S = [input() for i in range(N)]
print(ans173(N, S))


N = int(input())
from collections import Counter
S = [input() for i in range(N)]
c = Counter(S)
for s in ('AC', 'WA', 'TLE', 'RE'):
	print(s, 'x', c[s])


n = int(input())
ac = wa = tle = re = 0
for i in range(n):
	st = input()
	if st == 'AC':
		ac += 1
	elif st == 'WA':
		wa += 1
	elif st == 'TLE':
		tle += 1
	else:
		re += 1
print(f'AC x {ac}\nWA x {wa}\nTLE x {tle}\nRE x {re}')


from collections import Counter
N = int(input())
C = Counter([input() for _ in range(N)])
for k in ['AC', 'WA', 'TLE', 'RE']:
	print(k, 'x', C[k])


(n, *a) = open(0).read().split()
d = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for i in a:
	d[i] = d.get(i, 0) + 1
for (i, j) in d.items():
	print(i, 'x', j)


res = []
n = int(input())
for i in range(n):
	r = input()
	res.append(r)
ac = res.count('AC')
wa = res.count('WA')
tle = res.count('TLE')
re = res.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())
S = [input() for i in range(N)]
judge = ['AC', 'WA', 'TLE', 'RE']
for j in judge:
	print('{0} x {1}'.format(j, S.count(j)))


N = int(input())
Ss = [input() for i in range(N)]
for j in ['AC', 'WA', 'TLE', 'RE']:
	print('{} x {}'.format(j, Ss.count(j)))


n = int(input().rstrip())
s = [str(input().rstrip()) for i in range(n)]
for v in ['AC', 'WA', 'TLE', 'RE']:
	print(f'{v} x {s.count(v)}')


n = int(input())
s = [input() for i in range(n)]
print(f"AC x {s.count('AC')}\nWA x {s.count('WA')}\nTLE x {s.count('TLE')}\nRE x {s.count('RE')}")


ac = 0
wa = 0
tle = 0
re = 0
for i in range(int(input())):
	word = input()
	if word == 'AC':
		ac += 1
	elif word == 'WA':
		wa += 1
	elif word == 'TLE':
		tle += 1
	elif word == 'RE':
		re += 1
print('AC x ' + str(ac))
print('WA x ' + str(wa))
print('TLE x ' + str(tle))
print('RE x ' + str(re))


dic = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for _ in range(int(input())):
	dic[input()] += 1
for i in ['AC', 'WA', 'TLE', 'RE']:
	print(i + ' x ' + str(dic[i]))


n = int(input())
d = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for _ in range(n):
	d[input()] += 1
for (d1, d2) in d.items():
	print(d1, 'x', d2)


N = int(input())
S = [input() for _ in range(N)]
V = ['AC', 'WA', 'TLE', 'RE']
for v in V:
	print('{0} x {1}'.format(v, S.count(v)))


import collections
n = int(input())
list = []
for i in range(n):
	x = input()
	list.append(x)
c = collections.Counter(list)
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())
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))))


N = int(input())
S = ['' for i in range(N)]
for i in range(N):
	S[i] = str(input())
item = [0, 0, 0, 0]
rslt = ['AC', 'WA', 'TLE', 'RE']
for i in range(N):
	if S[i] == rslt[0]:
		item[0] += 1
	elif S[i] == rslt[1]:
		item[1] += 1
	elif S[i] == rslt[2]:
		item[2] += 1
	else:
		item[3] += 1
for i in range(4):
	print(rslt[i], 'x', item[i])


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


judges = ['AC', 'WA', 'TLE', 'RE']
n = int(input())
S = [input() for _ in range(n)]
for j in judges:
	print(f'{j} x {S.count(j)}')


from collections import Counter
from typing import List

def answer(n: int, s: List[str]) -> List[str]:
	result = []
	judges = ['AC', 'WA', 'TLE', 'RE']
	aggregate = {i: 0 for i in judges}
	counter = Counter(s)
	for i in counter:
		aggregate[i] += counter[i]
	for j in aggregate:
		result.append(f'{j} x {aggregate[j]}')
	return result

def main():
	n = int(input())
	s = [input() for _ in range(n)]
	for i in answer(n, s):
		print(i)

def __starting_point():
	main()
__starting_point()


N = int(input())
s = list()
for _ in range(N):
	s.append(input())
for result in ('AC', 'WA', 'TLE', 'RE'):
	print(f'{result} x {s.count(result)}')


N = int(input())
S = [input() for i in range(N)]
nac = len([s for s in S if s == 'AC'])
nwa = len([s for s in S if s == 'WA'])
ntle = len([s for s in S if s == 'TLE'])
nre = len([s for s in S if s == 'RE'])
print('AC x ' + str(nac))
print('WA x ' + str(nwa))
print('TLE x ' + str(ntle))
print('RE x ' + str(nre))


import collections as cs
c = cs.Counter([input() for i in range(int(input()))])
print(f"AC x {c['AC']}")
print(f"WA x {c['WA']}")
print(f"TLE x {c['TLE']}")
print(f"RE x {c['RE']}")


N = int(input())
(c0, c1, c2, c3) = (0, 0, 0, 0)
for i in range(N):
	r = input()
	if r == 'AC':
		c0 += 1
	elif r == 'WA':
		c1 += 1
	elif r == '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))


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


n = int(input())
a = [input() for _ in range(n)]
c = ['AC', 'WA', 'TLE', 'RE']
for i in c:
	print(i + ' x ' + str(a.count(i)))


n = int(input())
res = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for i in range(n):
	res[input()] += 1
for k in res:
	print('{} x {}'.format(k, res[k]))


N = int(input())
S = [input() for _ in range(N)]
lis = ['AC', 'WA', 'TLE', 'RE']
for l in lis:
	print('{} x {}'.format(l, S.count(l)))


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


N = int(input())
S = []
c0 = 0
c1 = 0
c2 = 0
c3 = 0
for i in range(N):
	S.append(input())
	if S[i] == 'AC':
		c0 += 1
	elif S[i] == 'WA':
		c1 += 1
	elif S[i] == 'TLE':
		c2 += 1
	elif S[i] == '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())
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))


N = int(input())
S = ['AC', 'WA', 'TLE', 'RE']
TC = []
for i in range(N):
	TC.append(input())
for s in S:
	print('{} x {}'.format(s, TC.count(s)))


import sys
inputs = []
for input in sys.stdin:
	inputs.append(input.replace('\n', ''))
AC = 0
WA = 0
TLE = 0
RE = 0
for (index, input) in enumerate(inputs, 1):
	if input == 'AC':
		AC += 1
	if input == 'WA':
		WA += 1
	if input == 'TLE':
		TLE += 1
	if input == 'RE':
		RE += 1
print('AC x ' + str(AC) + '\nWA x ' + str(WA) + '\nTLE x ' + str(TLE) + '\nRE x ' + str(RE))


N = int(input())
dic = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for i in range(N):
	S = input()
	if S == 'AC':
		dic['AC'] += 1
	elif S == 'WA':
		dic['WA'] += 1
	elif S == 'TLE':
		dic['TLE'] += 1
	else:
		dic['RE'] += 1
for key in list(dic.keys()):
	print('{0} x {1}'.format(key, dic[key]))


N = int(input())
item = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for n in range(N):
	S = input()
	if S == 'AC':
		item['AC'] += 1
	elif S == 'WA':
		item['WA'] += 1
	elif S == 'TLE':
		item['TLE'] += 1
	else:
		item['RE'] += 1
print('AC x', end=' ')
print(item['AC'])
print('WA x', end=' ')
print(item['WA'])
print('TLE x', end=' ')
print(item['TLE'])
print('RE x', end=' ')
print(item['RE'])


di = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
n = int(input())
for _ in range(n):
	di[input()] += 1
[print(f'{key} x {val}') for (key, val) in di.items()]


m = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for _ in range(int(input())):
	m[input()] += 1
for (s, n) in m.items():
	print(s, 'x', n)


N = int(input())
a1 = []
for i in range(N):
	a1.append(input())
a2 = ['AC', 'WA', 'TLE', 'RE']
for i in a2:
	print(i + ' x ' + str(a1.count(i)))


S = [input() for _ in range(int(input()))]
for k in ['AC', 'WA', 'TLE', 'RE']:
	print(k, 'x', S.count(k))


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 {}'.format(str(ac)))
print('WA x {}'.format(str(wa)))
print('TLE x {}'.format(str(tle)))
print('RE x {}'.format(str(re)))


n = int(input())
s = [input().split() for i in range(n)]
a = 0
b = 0
c = 0
d = 0
for i in range(n):
	if s[i][0] == 'AC':
		a += 1
	elif s[i][0] == 'WA':
		b += 1
	elif s[i][0] == '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))


b = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for _ in range(int(input())):
	a = input()
	b[a] += 1
for (key, val) in b.items():
	print(key, 'x', val)


n = int(input())
dict = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for _ in range(n):
	dict[input()] += 1
for i in dict:
	print(i, 'x', dict[i])


n = int(input())
res = [input() for _ in range(n)]
cnt = ['AC', 'WA', 'TLE', 'RE']
for c in cnt:
	print(c, 'x', res.count(c))


n = int(input())
a = [input() for i in range(n)]
for v in ['AC', 'WA', 'TLE', 'RE']:
	print('{0} x {1}'.format(v, a.count(v)))


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


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())
a = [input() for i in range(N)]
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())
ac = 0
wa = 0
tle = 0
re = 0
for _ 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', ac)
print('WA', 'x', wa)
print('TLE', 'x', tle)
print('RE', 'x', re)


n = int(input())
s = [input() for _ in range(n)]
cs = ('AC', 'WA', 'TLE', 'RE')
for c in cs:
	print('{} x {}'.format(c, s.count(c)))


n = int(input())
s = [str(input()) for _ in range(n)]
for v in ('AC', 'WA', 'TLE', 'RE'):
	print('{0} x {1}'.format(v, s.count(v)))


N = int(input())
lst = [input() for _ in range(N)]
V = ['AC', 'WA', 'TLE', 'RE']
for v in V:
	print('{} x {}'.format(v, lst.count(v)))


(a, w, t, r) = (0, 0, 0, 0)
for _ in range(int(input())):
	s = input()
	if s == 'AC':
		a += 1
	elif s == 'WA':
		w += 1
	elif s == 'TLE':
		t += 1
	else:
		r += 1
print('AC x', a)
print('WA x', w)
print('TLE x', t)
print('RE x', r)


N = int(input())
judge = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for _ in range(N):
	j_input = input()
	for j in judge.keys():
		if j_input == j:
			judge[j] += 1
for j in judge.keys():
	print(j, end=' x ')
	print(judge[j])


n = int(input())
s = [input() for _ in range(n)]
ac = s.count('AC')
wa = s.count('WA')
tle = s.count('TLE')
re = s.count('RE')
print(f'AC x {ac}')
print(f'WA x {wa}')
print(f'TLE x {tle}')
print(f'RE x {re}')


n = int(input())
s = [input() for i in range(n)]
results = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for res in s:
	results[res] += 1
for (r, num) in results.items():
	print(f'{r} x {num}')


N = int(input())
lst = [input() for _ in range(N)]
for i in ['AC', 'WA', 'TLE', 'RE']:
	print(f'{i} x {lst.count(i)}')


N = int(input())
data = [input() for _ in range(N)]
for d in ['AC', 'WA', 'TLE', 'RE']:
	print('{} x {}'.format(d, data.count(d)))


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


c = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for i in range(int(input())):
	c[input()] += 1
for (i, j) in c.items():
	print(i, 'x', j)


N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(N):
	value = str(input())
	if value == 'AC':
		AC += 1
	elif value == 'WA':
		WA += 1
	elif value == '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))