If A beats B, and B beats C, you cannot lock a victory for C over A. Doing so would create a "Rock-Paper-Scissors" loop where no one is at the top. : You must implement a recursive function (often called
CS50 Tideman problem set, the most challenging "feature" to develop is the lock_pairs Cs50 Tideman Solution
The Tideman algorithm works as follows: