N =int(input())
a = []
for i in range(N):
	a.append(input())

count_AC = 0
count_WA = 0
count_TLE = 0
count_RE = 0

for i in range(N):
	if a[i] == 'AC':
		count_AC += 1
	if a[i] == 'WA':
		count_WA += 1
	if a[i] == 'TLE':
		count_TLE += 1
	if a[i] == 'RE':
		count_RE += 1

print('AC　×　', end='')
print(count_AC)
print('WA　×　', end='')
print(count_WA)
print('TLE　×　', end='')
print(count_TLE)
print('RE　×　', end='')
print(count_RE)
