
import math
import collections


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