while True:
t=int(input())
if t==0:break
a=input().split()
s1=[]
for i in range(t):
s=list(a[i])
s.sort()
s1.append("".join(s))
s2=[]
for i in range(t):
if s1.count(s1[i])==1:
s2.append(int(a[i]))
s2.sort()
if len(s2)==0:print("None")
else:
for ii in s2:
print(ii,end=" ")
print()