def find_dead_ends(graph, width):
    """Find dead ends in a graph."""
    dead_ends = []
    for node in graph.nodes():
        if graph.degree(node) == 1 and node[0] < width - 1:
            dead_ends.append(node)
    return dead_ends
