All setup to write solving algorithm.