How can I create these files automatically ?

import mnemonic
from collections import Counter
def calculate_puzzle_parts(position_selector=17): # Default: check position 17
start = 1180591620717411303424
end = 2361183241434822606847
num_parts = 10000
part_size = (end - start) // num_parts
word_counter = Counter()
for i in range(num_parts):
start_dec = start + i * part_size
start_hex = "%064x" % start_dec
private_key = bytes.fromhex(start_hex)
language = 'english'
mnemonic_words = mnemonic.Mnemonic(language).to_mnemonic(private_key)
mnemonic_word_list = mnemonic_words.split()
if len(mnemonic_word_list) < position_selector:
print(f"Mnemonic too short at iteration {i}: {mnemonic_word_list}")
continue
selected_word = mnemonic_word_list[position_selector - 1] # Convert 1-based to 0-based index
word_counter.update([selected_word])
# Output the most common words at this position
for word, count in word_counter.most_common():
print(f"{word}")
calculate_puzzle_parts(position_selector=24) # Change this to analyze other positions like 16, 18, etc.
python3 words.py > 24.txt
for position 24 and so on

P.S.
There's no way this can be solved this way. .. go away now.
