from functools import reduce
def interp(word, letter, size):
    return (''.join(reduce(assign, zip(comb, word), [letter] * size)) for
        comb in combinations(list(range(size)), len(word)))
Permutations maintaining order of some elements