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

cnt_AC = 0
cnt_WA = 0
cnt_TLE = 0
cnt_RE = 0

for n in range(N):
    tmp = input()
    if(tmp == 'AC'):
        cnt_AC += 1
    elif(tmp == 'WA'):
        cnt_WA += 1
    elif(tmp == 'TLE'):
        cnt_TLE += 1
    elif(tmp == 'RE'):
        cnt_RE += 1

print('AC × ' + str(cnt_AC))
print('WA × ' + str(cnt_WA))
print('TLE × ' + str(cnt_TLE))
print('RE × ' + str(cnt_RE))
N = int(input())

cnt_AC = 0
cnt_WA = 0
cnt_TLE = 0
cnt_RE = 0

for n in range(N):
    tmp = input()
    if(tmp == 'AC'):
        cnt_AC += 1
    elif(tmp == 'WA'):
        cnt_WA += 1
    elif(tmp == 'TLE'):
        cnt_TLE += 1
    elif(tmp == 'RE'):
        cnt_RE += 1

print('AC x ' + str(cnt_AC))
print('WA x ' + str(cnt_WA))
print('TLE x ' + str(cnt_TLE))
print('RE x ' + str(cnt_RE))