 So I suppose we want to evaluate 18 to power 85 mod 263. So we'll begin by squaring 18 repeatedly, and we'll always reduce the results mod 263. So 18 is 18 mod 263. 18 squared, well that's 324, but we can reduce that to 61 mod 263. 18 to the fourth, well that is equal to 18 squared squared. But 18 squared is equivalent to 61, so 18 to the fourth will be equivalent to 61 squared. 61 squared is actually equal to 3721, which we can reduce to 39 mod 263. 18 to the eighth, well that's 18 to the fourth squared. 18 to the fourth is equivalent to 39, and 39 squared is, which we can reduce to 206 mod 263. 18 to the 16th, well that's equal to, or since 18 to the eighth is 206, this is, which reduces to 18 to the 32nd is, 18 to the 64 is 18 to the 32nd squared, which is equal to, and since we're only trying to find 18 to power 85, we don't need to find 18 to a higher power at this point. So now we want to assemble the pieces that are equal to 18 to power 85, so the pieces we need are going to be 18 to the 64, 18 to the 16th, 18 to the fourth, and 18 to the first. Remember the advantage of working mod n is you never have to work with large numbers, and so we know that 18 to the 64 is equivalent to 111. 18 to the 16th is equivalent to 93, 18 to the fourth is equivalent to 39, and 18 to the first is just 18, and now we can form the pairwise products, and again the advantage to working mod n is you never have to work with large numbers. So if I multiply 39 by 18, I do get large number 702, but I can reduce that to 176 mod 263. Now I can multiply the next two factors, 93 by 176, then reduce, and finally, what 11 times 62 is, which gives us 18 to power 85.