Start: Apr, 17, 2017 11:00:00
Python程序设计基础培训第五次作业
End: Apr, 23, 2017 15:00:00
Time elapsed:
Time remaining:

Problem_ID: C
Result: Accepted
Time: 123ms
Memory: 21432kB
Author: 13666577353
In contest: 1089

def strsort (a):
	li=list(a)
	li.sort()
	a=''.join(li)
	return a

while True:
	n=int(input())
	if n==0:break
	li1=raw_input().strip().split()
	li2=[]
	for i in range(len(li1)):
		li2.append(strsort(li1[i]))
	for i in range(len(li2)-1,-1,-1):
		if li2.count(li2[i])>1:
			del li1[i]
		
	if len(li1)==0:
		print 'None'
	else:
		li1=map(int,li1)
		li1.sort()
		for i in li1:
			print i,
		print