import random
digits = [chr(i) for i in range(48, 58)]
letters = [chr(i) for i in range(65, 91)] + [chr(i) for i in range(97, 123)]
number_of_digits = random.randint(1, 7)
number_of_letters = 8 - number_of_digits
randdigits = [random.choice(digits) for i in range(number_of_digits)]
randletters = [random.choice(letters) for i in range(number_of_letters)]
randdigits.extend(randletters)
random.shuffle(randdigits)
print(''.join(randdigits))