I forgot the password to my pdf. I remembered a few characters, so I made a simple password-cracker program in Python. Is the document lost now given the number of combinations? Out of curiosity, how could I speed up this program as much as possible?

```
from pikepdf import open
from itertools import  product
from math import factorial

c = '12A3ca9€'
c = sorted(set(c))
length = len(c)
total = ( (1-(length**(length+1)))/(1-length) ) - 1

s = 0
for s2 in range(length):
    s2 += 1
    m = product(c, repeat=s2)
    for i in m:
        try:
            with open(r"C:\Users\User\Desktop\Document.pdf", password=''.join(i)) as pdf:
                print(len(pdf.pages))
            print(''.join(i))
            exit(0)
        except:
            pass
        s+=1
        print(100*s/total)

```