N = int(input())
S = []
for i in range(N):
    a = input()
    S.append(a)

AC = 0
WA = 0
TLE = 0
RE = 0

for i in range(N):
    if i == AC:
        AC = AC + 1
    if i == WA:
        WA = WA + 1
    if i == TLE:
        TLE = TLE + 1
    if i == RE:
        RE = RE + 1

print("AC x " + AC)
print("WA x " + WA)
print("TLE x " + TLE)
print("RE x " + RE)

    