If bipartition is possible, print space-separated integers: the team number ( or ) for each pupil from to . If impossible, print the single word IMPOSSIBLE. The color array becomes your answer directly. After running bipartite detection successfully, print color[1]+1, color[2]+1, through color[n]+1. Adding converts your internal colors and to team numbers and as required by the output format.
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
$ curl repovive.com/roadmaps/graph-theory/bipartite-graphs/building-teams-output-format
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░███████████████████████████████████████████████████████████████████████████████████████