def main():
    n = int(input())
    mylist = []
    for i in range(1, n+1):
        s = input()
        mylist.append(s)
    ac=mylist.count('AC')
    wa=mylist.count('WA')
    tle=mylist.count('TLE')
    re=mylist.count('RE')
    print('AC × ' + str(ac))
    print('WA × ' + str(wa))
    print('TLE × ' + str(tle))
    print('RE × ' + str(re))
if __name__ == "__main__":
    main()