import itertools lis = input().split() lis1 = [] for i in [i for i in itertools.permutations(lis[-2])]: lis1.append("".join(i)) for k in range(lis1.count(lis[-2])): lis1.remove(lis[-2]) lis2=[j for j in lis[1:(int(lis[0])+1)] if j in lis1 ] lis2.sort() print(len(lis2)) i...