N=map(int,input().split())
S=list(map(str,input().split()))

AC=S.count('AC')
WA=S.count('WA')
TLE=S.count('TLE')
RE=S.count('RE')

print("AC × ", end='') 
print(AC)
print("WA × ", end='') 
print(WA)
print("TLE × ", end='') 
print(TLE)
print("RE × ", end='') 
print(RE)