Returns last iteration after it cannot solve the problem.