a=int(input())
AC=[]
WA=[]
TLE=[]
RE=[]
for i in range(a):
  s=(input())
  if s=='AC':
     AC.append(s)
  if s=='TLE':
     TLE.append(s)   
  if s=='WA':
     WA.append(s)
  if s=='RE':
     RE.append(s)
print('AC ×',len(AC))
print('WA ×',len(WA))
print('TLE ×',len(TLE))
print('RE ×',len(RE))
     
