<reponame>kylixalex/Advent-of-Code
import hashlib
inp = "abbhdwsy"
inp2 = ""
string = [" ", " ", " ", " ", " ", " ", " ", " "]
val = 0
y = 0
for i in range(100000000):
    val = val + 1
    inp2 = inp + str(val)
    result = hashlib.md5(inp2.encode()).hexdigest()
    if "00000" == result[0:5] and (0 <= int(result[5], 16) <= 7):
        if string[int(result[5], 16)] == " ":
            string[int(result[5], 16)] = result[6]
            print(string)
            y = y + 1
            if y == 8:
                exit()
