Generate a Python program that has the following intention:

The intention of the program is to calculate the greatest common divisor (GCD) of two numbers using the Euclidean algorithm. The Euclidean algorithm is a mathematical method for finding the GCD of two numbers.

The function p1 takes two inputs, a and b, and returns the GCD of a and b. The function first checks if b is equal to 0. If b is 0, then a is already the smallest positive divisor of a and b, so the function returns a. If b is not 0, then the function calls itself recursively with b and a % b as inputs. The modulo operation a % b gives the remainder when a is divided by b.

The recursive call finds the GCD of the two numbers b and a % b and returns it. The function then returns the GCD of a and b as the output.

Overall, the program calculates the GCD of two numbers using the Euclidean algorithm, which is a mathematical method for finding the GCD of two numbers.