solve coloring problem