if __name__ == '__main__':
    N = int(input())
    res = []
    for _ in range(N):
        res.append(str(input()))
    print('AC x {}'.format(res.count('AC')))
    print('WA x {}'.format('WA'))
    print('TLE x {}'.format('TLE'))
    print('RE x {}'.format('RE'))