Given a number n, find the smallest k such that all the bits of n in base k are 1.
Implement def smallest_good_base(n):. The input is an integer n, with 3 <= n <= 10^18, and the output is the smallest integer base k >= 2 for which every digit in the base-k representation of n equals 1.
def smallest_good_base(n):