def main():
    N = int(input())
    S = [input() for _ in range(N)]

    AC = 0
    WA = 0
    TLE = 0
    RE = 0
    for i in range(N):
        if S[i] == 'AC':
            AC += 1
        elif S[i] == 'WA':
            WA += 1
        elif S[i] == 'TLE':
            TLE += 1
        else:
            RE += 1

    print('AC × ' + str(AC))
    print('WA × ' + str(WA))
    print('TLE × ' + str(TLE))
    print('RE × ' + str(RE))

main()
