Implementation of a graph colouring algorithm for three colours.