a simple magic cube excersize in python