log multiplication and checking graph for cycles
del a.out
bipartite graph check