def resolve():
    N = int(input())
    ans = [0,0,0,0]
    for i in range(N):
        S = input()
        if S == 'AC':
            ans[0] += 1
        if S == 'WA':
            ans[1] += 1
        if S == 'TLE':
            ans[2] += 1
        if S == 'RE':
            ans[3] += 1
    print( 'AC × ' + str(ans[0]) )
    print( 'WA × ' + str(ans[1]) )
    print( 'TLE × ' + str(ans[2]) )
    print( 'RE × ' + str(ans[3]) )
resolve()