Python learning experience by solving a cube puzzle