#include<iostream>
#include<vector>
#include<string>
#include<algorithm>	
#include<map>
#include<set>
#include<utility>
#include<cmath>
#include<cstring>
#include<queue>
#include<stack>
#include<cstdio>
#include<sstream>
#include<iomanip>
#include<assert.h>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define all(in) in.begin(),in.end()
#define shosu(x) fixed<<setprecision(x)
using namespace std;
//kaewasuretyuui
typedef long long ll;
typedef int Def;
typedef pair<Def,Def> pii;
typedef vector<Def> vi;
typedef vector<vi> vvi;
typedef vector<pii> vp;
typedef vector<vp> vvp;
typedef vector<string> vs;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef pair<Def,pii> pip;
typedef vector<pip>vip;
//#define mt make_tuple
//typedef tuple<double,int,double> tp;
//typedef vector<tp> vt;
template<typename A,typename B>bool cmin(A &a,const B &b){return a>b?(a=b,true):false;}
template<typename A,typename B>bool cmax(A &a,const B &b){return a<b?(a=b,true):false;}
const double PI=acos(-1);
const double EPS=1e-7;
Def inf=sizeof(Def)==sizeof(long long)?2e18:1e9;
int dx[]={0,1,0,-1};
int dy[]={1,0,-1,0};
class SCC{//cmp(0 - kk-1) is scc's return. Same number is group. The number is no relatoin.
	public:
	int n;
	vvi G,rG,tG;
	vector<bool>used;
	vi vs,cmp;
	SCC(int size){
		n=size;
		G=rG=vvi(n);
		used=vector<bool>(n);
		cmp=vi(n);
		vs=vi(0);
	}
	void add_edge(int s,int t){
		G[s].pb(t);
		rG[t].pb(s);
	}
	void rdfs(int v,int k){
		used[v]=true;
		cmp[v]=k;
		rep(i,rG[v].size())if(!used[rG[v][i]])rdfs(rG[v][i],k);
	}
	void dfs(int v){
		used[v]=true;
		rep(i,G[v].size())if(!used[G[v][i]])dfs(G[v][i]);
		vs.pb(v);
	}
	int scc(){
		rep(i,n)used[i]=false;
		rep(v,n)if(!used[v])dfs(v);
		rep(i,n)used[i]=false;
		int kk=0;
		for(int i=vs.size()-1;i>=0;i--)if(!used[vs[i]])rdfs(vs[i],kk++);
		return kk;  
	}
	void make(int size){
		int N=size;
		tG=vvi(N);
		rep(i,n)rep(j,G[i].size())if(cmp[i]!=cmp[G[i][j]]){
			tG[cmp[i]].pb(cmp[G[i][j]]);
//			tG[cmp[G[i][j]]].pb(cmp[i]);
		}
	}
};
int main(){
	int n;
	while(cin>>n,n){
		vs in(n);
		rep(i,n)cin>>in[i];
		SCC scc(26);
		rep(i,n-1){
			int t=min(in[i].size(),in[i+1].size());
			if(in[i].substr(0,t)==in[i+1].substr(0,t)){
				if(in[i].size()>in[i+1].size()){
					cout<<"no"<<endl;
					goto end;
				}
			}else{
				rep(j,t)if(in[i][j]!=in[i+1][j]){
					scc.add_edge(in[i][j]-'a',in[i+1][j]-'a');
//					cout<<in[i][j]-'a'<<" "<<in[i+1][j]-'a'<<endl;
					break;
				}
			}
		}
		if(scc.scc()==26)cout<<"yes"<<endl;
		else cout<<"no"<<endl;
		end:;
	}
}