lock_pairs skips final pair if it creates cycle is working rest all lock_pair and print winner is not working. I am not able to fix it.
lock_pairs
lock_pair