Getting vertices for bipartite.