Python Collatz Solver