#include<iostream>
#include<cstdio>
#include<string>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
using namespace std;
typedef long long ll;
const ll MOD = 1000000007;
const ll INF = (ll)1000000007 * 1000000007;
const double EPS = 1e-9;
typedef pair<int,int> P;
typedef unsigned int ui;
#define stop char nyaa;cin>>nyaa;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)
typedef long double ld;
typedef complex<ld> Point;
const ld eps = 1e-11;
const ld pi = acos(-1.0);
int main() {
	int n;
	while (cin >> n, n) {
		vector<int> G[26]; bool f = true;
		string s, t;
		cin >> t;
		rep(i, n - 1) {
			s = t; cin >> t;
			if (!f)continue;
			int len1 = s.length();
			int len2 = t.length();
			int len = min(len1, len2);
			if (s.substr(0, len) == t.substr(0, len)) {
				if (len1 > len2)f = false;
			}
			else {
				rep(j, len) {
					if (s[j] != t[j]) {
						G[s[j] - 'a'].push_back(t[j] - 'a'); break;
					}
				}
			}
		}
		rep(i, 26) {
			int used[26] = {}; used[i] = 1;
			queue<int> q; q.push(i);
			while (!q.empty()) {
				int v = q.front(); q.pop();
				int len = G[v].size();
				rep(j, len) {
					if (G[v][j] == i) {
						f = false;
					}
					if (!used[G[v][j]]) {
						used[G[v][j]] = 1;
						q.push(G[v][j]);
					}
				}
			}
			if (!f)break;
		}
		if (f) cout << "yes" << endl;
		else cout << "no" << endl;
	}
	return 0;
}
