def main():
    import collections
    n = int(input())
    mylist = []
    for i in range(1, n+1):
        s = input()
        mylist.append(s)
    c = collections.Counter(mylist)
    print('AC × ' + str(c['AC']))
    print('WA × ' + str(c['WA']))
    print('TLE × ' + str(c['TLE']))
    print('RE × ' + str(c['RE']))
if __name__ == "__main__":
    main()