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())
con = [input() for i in range(N)]
C = [0,0,0,0]
for s in con:
    if(s == "AC"):
        C[0] +=1
    if(s == "WA"):
        C[1] +=1
    if(s == "TLE"):
        C[2] +=1
    if(s == "RE"):
        C[3] +=1
print("AC ×",C[0])
print("WA ×",C[1])
print("TLE ×",C[2])
print("RE ×",C[3])
 
N = int(input())
con = [input() for i in range(N)]
C = [0,0,0,0]
for s in con:
    if(s == "AC"):
        C[0] +=1
    if(s == "WA"):
        C[1] +=1
    if(s == "TLE"):
        C[2] +=1
    if(s == "RE"):
        C[3] +=1
print("AC x",C[0])
print("WA x",C[1])
print("TLE x",C[2])
print("RE x",C[3])
 