import re
import hashlib
md5 = lambda s: hashlib.md5(s).hexdigest()
def search(begin=0, maxresults=1):
reg = re.compile('^0+e[0-9]+$')
i = begin
res = 0
while 1:
password = str(i)
if reg.match(md5(password)[:16]):
print "md5(\"{}\")={}".format(password,md5(password))
res += 1
if res == maxresults:
return
i+=1
if __name__ == '__main__':
search(0, 3)
aW1wb3J0IHJlCmltcG9ydCBoYXNobGliCgptZDUgPSBsYW1iZGEgczogaGFzaGxpYi5tZDUocykuaGV4ZGlnZXN0KCkKCmRlZiBzZWFyY2goYmVnaW49MCwgbWF4cmVzdWx0cz0xKToKICAgIHJlZyA9IHJlLmNvbXBpbGUoJ14wK2VbMC05XSskJykKICAgIGkgPSBiZWdpbgogICAgcmVzID0gMAogICAgd2hpbGUgMToKICAgICAgICBwYXNzd29yZCA9IHN0cihpKQogICAgICAgIGlmIHJlZy5tYXRjaChtZDUocGFzc3dvcmQpWzoxNl0pOgogICAgICAgICAgICBwcmludCAibWQ1KFwie31cIik9e30iLmZvcm1hdChwYXNzd29yZCxtZDUocGFzc3dvcmQpKQogICAgICAgICAgICByZXMgKz0gMQogICAgICAgICAgICBpZiByZXMgPT0gbWF4cmVzdWx0czoKICAgICAgICAgICAgICAgIHJldHVybgogICAgICAgIGkrPTEKCmlmIF9fbmFtZV9fID09ICdfX21haW5fXyc6CiAgICBzZWFyY2goMCwgMyk=