Not corrected lenght of input formula, chengaed to len(letters)