python3: t = int(input()) for i in range(t): n = int(input()) string = [] for i in range(n): temp = [ord(i) for i in input()] temp.sort() string.append(temp) string = [tuple(i) for i in string] string = set(string) print(len(string)) ...