#include "bits/stdc++.h"

#define REP(i,n) for(ll i=0;i<ll(n);++i)
#define RREP(i,n) for(ll i=ll(n)-1;i>=0;--i)
#define FOR(i,m,n) for(ll i=m;i<ll(n);++i)
#define RFOR(i,m,n) for(ll i=ll(n)-1;i>=ll(m);--i)
#define ALL(v) (v).begin(),(v).end()
#define UNIQUE(v) v.erase(unique(ALL(v)),v.end());
#define INF 1000000001ll
#define MOD 1000000007ll
#define EPS 1e-9

constexpr int dx[8] = { 1,1,0,-1,-1,-1,0,1 };
constexpr int dy[8] = { 0,1,1,1,0,-1,-1,-1 };


using namespace std;

using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vi>;
using vvl = vector<vl>;
using pii = pair<int, int>;
using pll = pair<ll, ll>;

template <class T> bool chmin(T& a, const T& b) { if (a > b) { a = b; return true; } return false; }
template <class T> bool chmax(T& a, const T& b) { if (a < b) { a = b; return true; } return false; }
bool ok = true;
void dfs(vvi& g, vi &visited,int i) {
	if (!ok)return;
	if (visited[i])ok = false;
	visited[i] = 1;
	REP(j, g[i].size())dfs(g, visited, g[i][j]);
	visited[i] = 0;
}
int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	int n;
	while (cin >> n, n) {
		vector<string> v(n);
		REP(i, n)cin >> v[i];
		vvi g(26);
		ok = true;
		REP(i, n - 1) {
			bool done = false;
			REP(j, min(v[i].size(), v[i + 1].size())) {

				if (v[i][j] != v[i + 1][j]) {
					done = true;
					g[v[i][j] - 'a'].push_back(v[i + 1][j] - 'a');
					break;
				}
			}
			if (!done) {
				if (v[i].size() > v[i + 1].size())ok = false;
			}
		}
		REP(i, 26) {
			sort(ALL(g[i]));
			UNIQUE(g[i]);
		}
		vi visited(26, 0);
		REP(i, 26) {
			REP(j, 26)visited[j] = 0;
			dfs(g, visited, i);
		}
		if (ok)cout << "yes" << endl;
		else cout << "no" << endl;
	}
}
