import collections
# python template for atcoder
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

n = int(input())
arr = list(map(int, input().split()))
dic = collections.Counter(arr)

for s in ('AC', 'WA', 'TLE', 'RE'):
  print(s + ' x ' + str(dic[s]))