Now exits if no solution can be found.