#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<queue>
using namespace std;
string S[500]; bool W[26][26]; int n;
vector<int>X[26];
bool SearchingHeiro(int m) {
	int dist[1000];
	for (int i = 0; i < m; i++) {
		queue<int>Q;
		for (int j = 0; j < m; j++)dist[j] = 0;
		Q.push(i); int cnt = 0;
		while (!Q.empty()) {
			cnt++; int a1 = Q.front(); Q.pop();
			if (cnt >= 100000) { return true; }
			for (int j = 0; j < X[a1].size(); j++) {
				if (dist[X[a1][j]] > dist[a1] - 1) {
					dist[X[a1][j]] = dist[a1] - 1;
					Q.push(X[a1][j]);
				}
			}
		}
	}
	return false;
}
bool solve() {
	for (int i = 0; i < 676; i++) { X[i / 26].clear(); W[i / 26][i % 26] = false; }
	for (int i = 0; i < n; i++) {
		for (int j = i + 1; j < n; j++) {
			int Y = min(S[i].size(), S[j].size());
			for (int k = 0; k < Y + 1; k++) {
				if (k == Y) {
					if (S[i].size() > S[j].size())return false;
					break;
				}
				if (S[i][k] > S[j][k]) { W[S[i][k] - 'a'][S[j][k] - 'a'] = true; break; }
				if (S[i][k] < S[j][k]) { W[S[i][k] - 'a'][S[j][k] - 'a'] = true; break; }
			}
		}
	}
	for (int i = 0; i < 26; i++) {
		for (int j = 0; j < 26; j++) {
			if (W[i][j] == true)X[i].push_back(j);
		}
	}
	if (SearchingHeiro(26) == true)return false;
	return true;
}
int main() {
	while (true) {
		cin >> n; if (n == 0)break;
		for (int i = 0; i < n; i++)cin >> S[i];
		bool ans = solve();
		if (ans == true)cout << "yes" << endl;
		if (ans == false)cout << "no" << endl;
	}
	return 0;
}