Suppose that p is prime and that a and b are positive integers with (p, a)=1. The method in this exercise can be used to solve the linear congruence a x equiv b( bmod p). When the procedure of previous part is iterated, one obtains a sequence of linear congruences with coefficients of x equal to a_0=a>a_1>a_2> cdots. Show that there is a positive integer n with a_n=1, so that at the nth stage, one obtains a linear congruence x equiv B( bmod p).