efficient graph coloring with priority