require 'tsort'
require 'set'

class Hash
	include TSort
	alias :tsort_each_node :each_key
	def tsort_each_child(u)
		self[u].each {|v| yield v}
	end
end

loop do
	n = gets.to_i
	break if n == 0
	words = (1..n).map { gets.chomp }
	graph = {}
	(?a..?z).each {|c| graph[c] = Set.new }

	ok = true
	words.each_cons(2) do |w1, w2|
		if w1 != w2 && w1 =~ /^#{w2}/
			ok = false
			break
		end
		(0..[w1.size, w2.size].min-1).each do |i|
			next if w1[i] == w2[i]
			graph[w1[i]] << w2[i]
			break
		end
	end

	if ok
		begin
			graph.tsort
		rescue TSort::Cyclic
			ok = false
		end
	end

	puts ok ? 'yes' : 'no'
end