#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < n; i++)
using namespace std;

int n;
vector<int> s[500];
vector<int> e[30];
bool saw[500];

bool f(int p, int ori){
	if(saw[p] && p == ori) return false;
	if(saw[p]) return true;
	saw[p] = true;
	rep(i,e[p].size()){
		if(!f(e[p][i],ori)) return false;
	}
	return true;
}

void solve(){
	rep(i,500) saw[i] = false;
	rep(i,500) s[i].clear();
	rep(i,30) e[i].clear();
	rep(i,n){
		string str;
		cin >> str;
		rep(j,str.size()){
			int x = str[j]-'a';
			s[i].push_back(x);
		}
	}
	for(int i = 0; i < n-1; i++){
		int t = min(s[i].size(),s[i+1].size());
		bool ok = false;
		rep(j,t){
			if(s[i][j] != s[i+1][j]){
				e[s[i][j]].push_back(s[i+1][j]);
				ok = true;
				break;
			}
		}
		if(!ok){
			if(s[i].size() > s[i+1].size()){
				puts("no");
				return;
			}
		}
	}
	rep(i,30) sort(e[i].begin(),e[i].end());
	rep(i,30) e[i].erase(unique(e[i].begin(),e[i].end()),e[i].end());
	rep(i,30){
		rep(j,500) saw[j] = false;
		if(!f(i,i)){
			puts("no");
			return;
		}
	}
	puts("yes");

}

int main(){
	while(true){
		cin >> n;
		if(n == 0) break;
		solve();
	}
}