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.
n = int(input())

d = {}

for i in range(n):
    s = input()
    if s in d:
        d[s] += 1
    else:
        d[s] = 1

for key, val in d.items():
    print(key, 'x', val)

if 'AC' not in d:
    print('AC x 0')
if ('WA' not in d):
    print('WA x 0')
if('TLE' not in d):
    print('TLE x 0')
if 'RE' not in d:
    print('RE x 0')

n = int(input())

d = {}
lst = ['AC', 'WA', 'TLE', 'RE']
for i in range(n):
    s = input()
    if s in d:
        d[s] += 1
    else:
        d[s] = 1

for i in lst:
    if i in d:
        print(i, 'x', d[i])
    else:
        print(i, 'x 0')
