Python solver and generator for the math game 24.