Try all scenarios, output the best one