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())
S=[input() for _ in range(1,N+1)]

C0=0
C1=0
C2=0
C3=0

for s in S:
    if s=='AC':
        C0+=1
    elif s=='WA':
        C1+=1
    elif s=='TLE':
        C2+=1
    elif s=='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)]
for v in ['AC', 'WA', 'TLE', 'RE']:
    print('{0} x {1}'.format(v, s.count(v)))