Python scripts to solve the Cue programming challenge