Generate code that has the following intention.

The intention of the program is to check if a given string of brackets is properly balanced. The function `p1` takes a string of brackets as input and calculates the vertical distance between the opening and closing brackets.

The calculation of the vertical distance is done by starting from the first bracket and iterating through the string. For each bracket, the function checks if it is an opening bracket and decrements the vertical distance by 1. If it is a closing bracket, the vertical distance is incremented by 1. If the vertical distance becomes negative, it means that there is an extra closing bracket, and the function returns `False`.

Once the loop is complete, the function checks if the vertical distance is equal to 0. If it is, it means that the number of opening and closing brackets is the same, and the string is properly balanced. Otherwise, the string is not properly balanced.

In summary, the program checks if a string of brackets is properly balanced by calculating the vertical distance between the opening and closing brackets and ensuring that the distance is equal to 0. Provide two versions of response separated with exactly 6 asterisk symbols: ******.
user