Collatz sample first version