N = int(input()) 
s = [input() for i in range(N)] 
def count_ac (s):
    n = 0
    for i in range (0, N):
        if s[i] == "AC":
            n = n + 1
        else:
            n = n
    return n
def count_wa (s):
    n = 0
    for i in range (0, N):
        if s[i] == "WA":
            n = n + 1
        else:
            n = n
    return n
def count_tle (s):
    n = 0
    for i in range (0, N):
        if s[i] == "TLE":
            n = n + 1
        else:
            n = n
    return n
def count_re (s):
    n = 0
    for i in range (0, N):
        if s[i] == "RE":
            n = n + 1
        else:
            n = n
    return n
C0 = count_ac (s)
C1 = count_wa (s)
C2 = count_tle (s)
C3 = count_re (s)
print ('AC × ',C0, 'WA × ',C1,'TLE × ',C2,'RE × ',C3)