Misra & Gries edge coloring algorithm