from string import ascii_letters, digits
from random import choice

length = int(input("length: "))
pass_amount = int(input("pass_amount: "))

list1 = ascii_letters + digits
password = str()
counter = 0

while counter != pass_amount:
	for i in choice(list1):
		password += i
		if len(password) == length:
			f = open("C:/py/pass.txt", "w")
			password += "\n"
			f.write(password)
			f.close()
			print(password)
			counter += 1
			password = str()
