Wrong answer in bipartite graph code

why are u doing 3-color?