import collections
AC=0
WA=0
TLE=0
RE=0
N=int(input())
S=[]
for i in range(N):
  S.append(input())
count=collections.Counter(S)
print("AC x　{}".format(count["AC"]))
print("WA x　{}".format(count["WA"]))
print("TLE x　{}".format(count["TLE"]))
print("RE x　{}".format(count["RE"]))