#import sys
#import numpy as np
import math
#from fractions import Fraction
import itertools
from collections import deque
from collections import Counter
#import heapq
#from fractions  import gcd
#input=sys.stdin.readline
import bisect
n=int(input())
d=[0]*4
for i in range(n):
    s=input()
    if s=="AC":
        d[0]+=1
    elif s=="WA":
        d[1]+=1
    elif s=="TLE":
        d[2]+=1
    else:
        d[3]+=1
print("AC ×",d[0])
print("WA ×",d[1])
print("TLE ×",d[2])
print("RE ×",d[3])