Color circles

There are circles drawn on the plane. It is known that the map formed by them can be correctly colored two colors. An algorithm for such coloring has been implemented.

Circles count:   First color: Second color: