#include <bits/stdc++.h>
using namespace std;

int main()
{
	ios::sync_with_stdio(false), cin.tie(0);
	int n;
	while (cin >> n, n) {
		vector<string> s(n);
		for (int i = 0; i < n; i++) {
			cin >> s[i];
		}
		bool ok = true;
		vector<vector<int>> d(26, vector<int>(26, 1e9));
		for (int i = 1; i < n; i++) {
			int l1 = s[i - 1].size(), l2 = s[i].size();
			int p = 0;
			while (p < l1 && p < l2 && s[i - 1][p] == s[i][p]) ++p;
			if (p < l1 && p < l2) {
				d[s[i - 1][p] - 'a'][s[i][p] - 'a'] = -1;
			}
			else if (p < l1) {
				ok = false;
			}
		}
		for (int k = 0; k < 26; k++) {
			for (int i = 0; i < 26; i++) {
				for (int j = 0; j < 26; j++) {
					d[i][j] = min(d[i][j], d[i][k] + d[k][j]);
				}
			}
		}
		for (int i = 0; i < 26; i++) {
			if (d[i][i] < 0) {
				ok = false;
			}
		}
		puts(ok ? "yes" : "no");
	}
	return 0;
}

