Best solutions for problem 9 in testing_round_29