Separated solve_case from ordered_print, for ordering clairity