#The code below does not need to be modified.
#Evaluate this cell (once) to define the function and you won't need to do it again.
def Mignotte(t, n):
if t > n:
print "t must not exceed n"
return False
i = 0
while True:
i = i + 1
M = [nth_prime(i) for i in range(i, i+n)] #a list of n consec. primes, starting with the ith prime.
alpha = prod(M[:t]) #product of first t primes
beta = prod(M[-(t-1):]) #product of last t-1 primes
if alpha > beta: break
S = ZZ.random_element(beta + 1, alpha) #the secret number!
R = [S % m for m in M] #the residues of S
return R, M