Generate a Python program that has the following intention:

The program calculates the greatest common divisor (GCD) of two numbers using the Euclidean algorithm. The Euclidean algorithm is an efficient algorithm for finding the GCD of two numbers.

The program defines a function p1(a, b) that takes two numbers a and b as input and returns the GCD of a and b. The function uses a recursive approach to find the GCD.

The function first checks if b is equal to 0. If b is equal to 0, then a is already the GCD of a and b. In this case, the function returns a.

If b is not equal to 0, then the function calls itself with b and a % b as input. The modulo operation a % b gives the remainder when a is divided by b. The function continues this process until b is equal to 0.

Finally, the function returns the GCD of a and b to the calling function.

In summary, the program calculates the GCD of a and b using the Euclidean algorithm by repeatedly dividing the larger number by the smaller number until the smaller number becomes zero. The program then returns the GCD.