First iteration of solution for each sample case