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())
AC,WA,RE,TLE = 0,0,0,0
for i in range(N):
    result = input()
    if result == "AC":
        AC += 1
    elif result == "WA":
        WA += 1
    elif result == "RE":
        RE += 1
    else:
        TLE += 1

print("AC x " + str(AC))
print("WA x " + str(WA))
print("RE x " + str(RE))
print("TLE x " + str(TLE))
N = int(input())
Ac,Wa,Re,Tle = 0,0,0,0
for i in range(N):
    result = input()
    if result == "AC":
        Ac += 1
    elif result == "WA":
        Wa += 1
    elif result == "RE":
        Re += 1
    else:
        Tle += 1

print("AC x " + str(Ac))
print("WA x " + str(Wa))
print("TLE x " + str(Tle))
print("RE x " + str(Re))