n = int(input())
s = [str(input()) for _ in range(n)]

dic = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}

for i in s:
    if i == 'AC':
        dic['AC'] += 1
    elif i == 'WA':
        dic['WA'] += 1
    elif i == 'TLE':
        dic['TLE'] += 1
    else:
        dic['RE'] += 1

for i in dic:
    # print(i)
    print("{0} × {1}".format(i, dic[i]))