def is_unique(text, index, step):
box = set()
size = len(text)
while (index < size):
if text[index] in box:
return False
box.add(text[index])
index += step
return True
line = input('string: ')
separator = input('separator: ')
lst = line.split(separator)
for token in lst:
if token[0].isupper() and 6 < len(token) and is_unique(token, 1, 2):
print(token)