Implemented first coloring algorithm