N = int(input())
status={'AC':0, 'WA':0, 'TLE':0, 'RE':0}
results = [input() for n in range(N)]
for result in results:
     if result in status.keys():
         status[result] += 1
for k, v in status.items():
    print('{} × {}'.format(k, v))