def is_anagram(s1,s2):
return sorted(s1) == sorted(s2)
def find_brother_words(words,x,k):
brother_words = []
for word in words:
if word != x and is_anagram(word,x):
brother_words.append(word)
brother_words.sort()
print(len(brother_words))
if k <= len(brother_words):
print(brother_words[k-1])
lines = input().strip().split()
n = int(lines[0])
words = lines[1:n+1]
x = lines[n+1]
k = int(lines[n+2])
find_brother_words(words, x, k)



京公网安备 11010502036488号