def locate_all_or_nothing_cycle(player):
    """ Locate a cycle of (least-preferable, second-choice) pairs to be removed
    from the game."""
    lasts = [player]
    seconds = []
    while True:
        second_best = player.prefs[1]
        their_worst = second_best.prefs[-1]
        seconds.append(second_best)
        lasts.append(their_worst)
        player = their_worst
        if lasts.count(player) > 1:
            break
    idx = lasts.index(player)
    cycle = zip(lasts[idx + 1:], seconds[idx:])
    return cycle
