from hashlib import md5
key = 'yzbqklnj'
n = 1
while True:
    md5hash = md5(bytes(key + str(n), 'utf-8')).hexdigest()
    if md5hash[:5] == '00000':
        print('Part 1:', n)
        break
    n += 1
n = 1
while True:
    md5hash = md5(bytes(key + str(n), 'utf-8')).hexdigest()
    if md5hash[:6] == '000000':
        print('Part 2:', n)
        break
    n += 1

15fce31dbae524142d25526a4119d365a61d9ae0
<mask token>

<mask token>
while True:
    md5hash = md5(bytes(key + str(n), 'utf-8')).hexdigest()
    if md5hash[:5] == '00000':
        print('Part 1:', n)
        break
    n += 1
<mask token>
while True:
    md5hash = md5(bytes(key + str(n), 'utf-8')).hexdigest()
    if md5hash[:6] == '000000':
        print('Part 2:', n)
        break
    n += 1

<mask token>
key = 'yzbqklnj'
n = 1
while True:
    md5hash = md5(bytes(key + str(n), 'utf-8')).hexdigest()
    if md5hash[:5] == '00000':
        print('Part 1:', n)
        break
    n += 1
n = 1
while True:
    md5hash = md5(bytes(key + str(n), 'utf-8')).hexdigest()
    if md5hash[:6] == '000000':
        print('Part 2:', n)
        break
    n += 1

from hashlib import md5
key = 'yzbqklnj'
n = 1
while True:
    md5hash = md5(bytes(key + str(n), 'utf-8')).hexdigest()
    if md5hash[:5] == '00000':
        print('Part 1:', n)
        break
    n += 1
n = 1
while True:
    md5hash = md5(bytes(key + str(n), 'utf-8')).hexdigest()
    if md5hash[:6] == '000000':
        print('Part 2:', n)
        break
    n += 1
