#include <cstdlib>
#include <cstring>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;

bool calc(const vector<string> &words) {
	const int n = words.size();
	bool mat[26][26] = {};

	for(int i = 0; i < n - 1; ++i) {
		for(int j = i + 1; j < n; ++j) {
			if(words[i] != words[j] && words[i].find(words[j]) == 0)
				return false;

			const int l = min(words[i].size(), words[j].size());
			for(int k = 0; k < l; ++k) {
				if(words[i][k] != words[j][k]) {
					mat[words[i][k] - 'a'][words[j][k] - 'a'] = true;
					break;
				}
			}
		}
	}

	int in[26] = {};
	for(int i = 0; i < 26; ++i) {
		for(int j = 0; j < 26; ++j) {
			if(mat[i][j]) ++in[j];
		}
	}

	queue<int> que;
	for(int i = 0; i < 26; ++i) if(in[i] == 0) que.push(i);

	int cnt = 0;
	while(!que.empty()) {
		const int v = que.front();
		que.pop();
		++cnt;

		for(int i = 0; i < 26; ++i) {
			if(mat[v][i] && --in[i] == 0)
				que.push(i);
		}
	}

	return cnt == 26;
}

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	for(int n; cin >> n && n;) {
		vector<string> words(n);
		for(auto &word : words) {
			cin >> word;
		}

		cout << (calc(words) ? "yes" : "no") << endl;
	}

	return EXIT_SUCCESS;
}