def find_closest_road(data, from_):
    """
    Find closest road with Breadth First Search (BFS).

    Args:
        data: array for search
        from_: [x, y] starting point for search
    """

    queue = [(from_, [tuple(from_)])]
    visited = set()
    visited.add(tuple(from_))

    while len(queue):
        # pop position & paths
        current, paths = queue.pop(0)

        if data[current[0], current[1]] != data[from_[0], from_[1]]:  # if found road then return paths
            return paths
        for (dix, diy) in [(-1, -1), (-1, 0), (0, -1), (1, 1), (1, 0), (0, 1), (1, -1), (-1, 1)]:
            to_ = (
                current[0] + dix,
                current[1] + diy
            )
            if to_ not in visited and 0 <= to_[0] < data.shape[0] and 0 <= to_[1] < data.shape[1]:
                # add to queue
                queue.append((to_, paths + [to_]))
                visited.add(to_)