# coding: utf-8
N=int(input())
L=["AC","WA","TLE","RE"]
cnt=[0,0,0,0]

for i in range(N):
    s=input()
    for j in range(4):
        if s==L[j]:
            cnt[j]+=1

for i in range(4):
    print("{} × {}".format(L[i],cnt[i]))