def accessible(g, s):
    """Returns the set of vertices of the graph g that are accessible
    from the vertex s"""
    acc = set()
    acc.add(s)
    list = [s]
    while len(list) > 0:
        x = list[0]
        list = list[1:]
        for y in g.parseNout(x):
            if y not in acc:
                acc.add(y)
                list.append(y)
    return acc