Water Jug Problem Solution In Python