Вы можете получить их, используя itertools :
from itertools import permutations, product
a_variants = [dict(zip(["ad", "bigd", "lugd"], values))
for values in product(permutations(["tau","guru"]), repeat=3)]
b_variants = [dict(zip(["tau", "guru"], values))
for values in product(permutations(["ad", "bigd", "lugd"]), repeat=2)]
all_variants = product(a_variants, b_variants)
for va, vb in all_variants:
print("a:", va, "\nb:", vb, "\n")
Выход:
a: {'ad': ('tau', 'guru'), 'bigd': ('tau', 'guru'), 'lugd': ('tau', 'guru')}
b: {'tau': ('ad', 'bigd', 'lugd'), 'guru': ('ad', 'bigd', 'lugd')}
a: {'ad': ('tau', 'guru'), 'bigd': ('tau', 'guru'), 'lugd': ('tau', 'guru')}
b: {'tau': ('ad', 'bigd', 'lugd'), 'guru': ('ad', 'lugd', 'bigd')}
...
a: {'ad': ('guru', 'tau'), 'bigd': ('guru', 'tau'), 'lugd': ('guru', 'tau')}
b: {'tau': ('lugd', 'bigd', 'ad'), 'guru': ('lugd', 'ad', 'bigd')}
a: {'ad': ('guru', 'tau'), 'bigd': ('guru', 'tau'), 'lugd': ('guru', 'tau')}
b: {'tau': ('lugd', 'bigd', 'ad'), 'guru': ('lugd', 'bigd', 'ad')}
Обратите внимание, что у вас есть 2 ** 3 * (3 * 2) ** 2 = 288 различных выходов.