def winning_move(macroboard):
    """
    Returns a valid winning move for the macroboard, if present.
    Returns None, otherwise
    """
    moves = macroboard.available_moves
    for px, py in moves:
        macroboard.make_move(px, py)
        if macroboard.has_a_winner:
            return (px, py)
        macroboard.undo_last_move()
    return None