A round robin tournament has 13 contestants. Each contestant plays each of the others once, and each wins 6 times and loses 6 times. How many triples (A,B,C) are there such that A beats B who beats C who beats A?