import math
def main():
    judge_l = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
    l = int(input().rstrip())
    for i in range(l):
      judge = input().rstrip()
      judge_l[judge] += 1
    
    print('AC × {}'.format(judge_l['AC']), end='\n')
    print('WA × {}'.format(judge_l['WA']), end='\n')
    print('TLE × {}'.format(judge_l['TLE']), end='\n')
    print('RE × {}'.format(judge_l['RE']), end='')
    
if __name__ == "__main__":
    main()
