def main():
    n = int(input())
    cnt = [0, 0, 0, 0]
    for _ in range(n):
        s = input()
        if s == 'AC':
            cnt[0] += 1
        elif s == 'WA' :
            cnt[1] += 1
        elif s == 'TLE':
            cnt[2] += 1
        elif s == 'RE':
            cnt[3] += 1

    print(f'AC × {cnt[0]}')
    print(f'WA × {cnt[1]}')
    print(f'TLE × {cnt[2]}')
    print(f'RE × {cnt[3]}')


if __name__ == "__main__":
    main()


