from Crypto.Util.number import getPrime, inverse, bytes_to_long
from string import ascii_letters, digits
from random import choice
mini = 10**100
for i in range(10):
m = "".join(choice(ascii_letters + digits) for _ in range(16))
p = getPrime(128)
q = getPrime(128)
n = p * q
e = 65537
d = inverse(e, (p - 1) * (q - 1))
c= pow(bytes_to_long(m.encode()), e, n)
mini = min(mini, d)
print(mini)
ZnJvbSBDcnlwdG8uVXRpbC5udW1iZXIgaW1wb3J0IGdldFByaW1lLCBpbnZlcnNlLCBieXRlc190b19sb25nCmZyb20gc3RyaW5nIGltcG9ydCBhc2NpaV9sZXR0ZXJzLCBkaWdpdHMKZnJvbSByYW5kb20gaW1wb3J0IGNob2ljZQoKCm1pbmkgPSAxMCoqMTAwCgpmb3IgaSBpbiByYW5nZSgxMCk6CgogICAgbSA9ICIiLmpvaW4oY2hvaWNlKGFzY2lpX2xldHRlcnMgKyBkaWdpdHMpIGZvciBfIGluIHJhbmdlKDE2KSkKICAgIHAgPSBnZXRQcmltZSgxMjgpCiAgICBxID0gZ2V0UHJpbWUoMTI4KQogICAgbiA9IHAgKiBxCiAgICBlID0gNjU1MzcKICAgIGQgPSBpbnZlcnNlKGUsIChwIC0gMSkgKiAocSAtIDEpKQoKICAgIGM9IHBvdyhieXRlc190b19sb25nKG0uZW5jb2RlKCkpLCBlLCBuKQogICAgbWluaSA9IG1pbihtaW5pLCBkKQogICAgCnByaW50KG1pbmkp