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
    for key in judge_l.keys():
        print('{} × {}'.format(key, judge_l[key]))
    
if __name__ == "__main__":
    main()
