sudo pip3 install more-itertools
from itertools import combinations from itertools import permutations