#include "bits/stdc++.h"
#include<unordered_map>
#pragma warning(disable:4996)
using namespace std;


struct Dscc {
public:

	//belongs,newedges
	pair<vector<vector<int>>, vector<vector<int>>>get(const vector<vector<int>>&edges) {
		nums.resize(edges.size());
		fill(nums.begin(), nums.end(), -1);
		vector<vector<int>>revedges(edges.size());
		for (int i = 0; i < edges.size(); ++i) {
			for (auto j : edges[i]) {
				revedges[j].push_back(i);
			}
		}
		int num = 0;
		for (int i = 0; i < edges.size(); ++i) {
			dfs(i, num, edges);
		}
		vector<int>big(nums.size());
		for (int i = 0; i < nums.size(); ++i) {
			big[nums[i]] = i;
		}
		reverse(big.begin(), big.end());
		unis.resize(edges.size());
		fill(unis.begin(), unis.end(), -1);
		num = 0;
		for (int i = 0; i < big.size(); ++i) {

			dfs2(big[i], num, revedges);
			num++;
		}
		vector<int>nums;
		for (int i = 0; i < unis.size(); ++i) {
			nums.push_back(unis[i]);
		}
		sort(nums.begin(), nums.end());
		nums.erase(unique(nums.begin(), nums.end()), nums.end());


		map<int, int>mp;
		for (int i = 0; i < nums.size(); ++i) {
			mp[nums[i]] = i;
		}
		for (int i = 0; i < unis.size(); ++i) {
			unis[i] = mp[unis[i]];
		}

		vector<vector<int>>belongs(nums.size());
		for (int i = 0; i < unis.size(); ++i) {
			belongs[unis[i]].push_back(i);
		}
		vector<vector<int>>newedges(nums.size());
		for (int i = 0; i < edges.size(); ++i) {
			for (auto j : edges[i]) {
				if (unis[i] != unis[j]) {
					newedges[unis[i]].push_back(unis[j]);
				}
			}
		}
		return make_pair(belongs, newedges);
	}
private:
	vector<int>nums;
	vector<int>unis;

	void dfs(const int id, int &num, const vector<vector<int>>&edges) {
		if (nums[id] != -1)return;
		else {
			nums[id] = -2;
			for (auto i : edges[id]) {
				dfs(i, num, edges);
			}
		}
		nums[id] = num++;
		return;
	}
	void dfs2(const int id, const int &num, const vector<vector<int>>&edges) {
		if (unis[id] != -1)return;
		else {
			unis[id] = -2;
			for (auto i : edges[id]) {
				dfs2(i, num, edges);
			}
		}
		unis[id] = num;
		return;
	}


}dscc;

int main() {
	while (1) {
		int N; cin >> N;
		if (!N)break;
		vector<string>sts;
		for (int i = 0; i < N; ++i) {
			string st; cin >> st;
			sts.push_back(st);
		}
		bool ok = true;
		vector<vector<int>>edges(26);
		for (int i = 0; i < N - 1; ++i) {
			string from = sts[i];
			string to = sts[i + 1];
			
			if (to.find(from) == 0) {
				continue;
			}
			else if(from.find(to)==0){
				ok = false;
				break;
			}
			else {
				int num = 0;
				while (1) {
					if (from[num] == to[num]) {

					}
					else {
						edges[from[num] - 'a'].push_back(to[num] - 'a');
						break;
					}
					num++;
				}
			}
		}
		if (ok) {
			auto pa=dscc.get(edges);
			if (pa.first.size() == 26) {

			}
			else {
				ok = false;
			}
		}
		if (ok) {
			cout << "yes" << endl;
		}
		else {
			cout << "no" << endl;
		}

	}
	return 0;
}