how to make bruteforce without itertools in python : i'm new in python, 
 i try calculate 3 ** 16(¹[0-f] ² [0-f] ³ [0-f] but not working properly.
this is my code, please help me to corrected my code.
   
    inp = str(input('value len 0-3 digit:'))
    hexa = ('0123456789abcdef');
    //len(hexa) = 16 digit
    //pass = '36f'
    pass = inp
    for x in range(0, 3 ** len(hexa)):
    // range = 0..(3 ^ 16)
        if(hexa[x] == pass):
            found = hexa[x]
    //if result valid
            print("pos: %d, pass: %s" % (x, found))
    //print position

but i got error "index out of bound",
i need output like this.
   
    000 #first
    001
    002
    ...
    ...
    fff #last

how to fix it?
thanks before. ;)