import math
import collections


def main():
  N = int(input())
  S = [int(input()) for _ in range(N)]
  
  A = collections.Counter(S)
  
  print('AC × ' + A['AC'])
  print('WA × ' + A['WA'])
  print('TLE × ' + A['TLE'])
  print('RE × ' + A['RE'])
  
  
  
main()