import sys
stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)

def LI(): return list(map(int, stdin.readline().split()))
def LS(): return list(stdin.readline())

import collections

n = int(input())
s = [input() for i in range(n)]
c = collections.Counter(s)
print(f'AC x {c["AC"]}')
print(f'WA x {c["WA"]}')
print(f'LTE x {c["TLE"]}')
print(f'RE x {c["RE"]}')