Water Jug Problem Python Code