Graph coloring using Chatin's algorithm