#

import sys
input=sys.stdin.readline

def main():
    N=int(input())
    r=["AC","WA","TLE","RE"]
    c=[0]*4
    for i in range(N):
        s=input().strip("\n")
        c[r.index(s)]+=1
    for i in range(4):
        print(r[i],"×",c[i])
    
    
    
if __name__=="__main__":
    main()
