li = input()
li_new = []
for each in li:
if each.isalpha() and each.upper() not in li_new and each.lower() not in li_new:
li_new.append(each)
if len(li_new) < 10:
print('not found')
else:
print(''.join(li_new[:10]))
li = input()
li_new = []
for each in li:
if each.isalpha() and each.upper() not in li_new and each.lower() not in li_new:
li_new.append(each)
if len(li_new) < 10:
print('not found')
else:
print(''.join(li_new[:10]))