def getSuffixArray(str):
	visited = set()
	suffixSet = set()
	list=[]
	for i in range(0,len(str)):
		suffixSet.add(str[i:])
	print suffixSet
	for c in str:
		if not c in visited:
			list.append(c)
			visited.add(c)
	list.sort()
	print list


getSuffixArray("banana")

6b73558e1b96d6c7dd3585022f119a072a98c093
def getSuffixArray(str):
	visited = set()
	suffixSet = set()
	list=[]
	for i in range(0,len(str)):
		suffixSet.add(str[i:])
	print suffixSet
	for c in str:
		if not c in visited:
			list.append(c)
			visited.add(c)
	list.sort()
	print list


getSuffixArray("banana")
