N = int(input())
C = [ 0 for i in range(4) ]
s2num = {"AC":0, "WA":1, "TLE":2, "RE":3}
num2s = {0:"AC", 1:"WA", 2:"TLE", 3:"RE"}
# read
for i in range(N):
    num = s2num[ input() ]
    C[num] += 1
    #print(num)
# print
for i in range(4):
    print("{} × {}".format( num2s[i], C[i] ))


