#include<iomanip>
#include<limits>
#include<thread>
#include<utility>
#include<iostream>
#include<string>
#include<algorithm>
#include<set>
#include<map>
#include<vector>
#include<stack>
#include<queue>
#include<cmath>
#include<numeric>
#include<cassert>
#include<random>
#include<chrono>
#include<unordered_map>
#include<fstream>
#include<list>
#include<functional>
#include<bitset>
#include<complex>
#include<tuple>
using namespace std;
typedef unsigned long long int ull;
typedef long long int ll;
typedef pair<ll,ll> pll;
typedef pair<int,int> pi;
typedef pair<double,double> pd;
typedef pair<double,ll> pdl;
#define F first
#define S second
const ll E=1e18+7;
const ll MOD=1000000007;

vector<vector<bool>> edge(27,vector<bool>(27,false));

//強連結成分分解
class SCC{
public:
    vector<vector<ll>> E;
    vector<vector<ll>> rev;
    ll V;
    vector<ll> v;
    vector<ll> group;
    
    void dfs(ll where,ll &count){
        v[where]=-2;
        for(int i=0;i<E[where].size();i++){
            ll t=E[where][i];
            if(v[t]!=-1){continue;}
            dfs(t,count);
        }
        v[where]=count;
        count++;
    }
    
    void first(){
        ll count=0;
        for(int i=0;i<V;i++){
            if(v[i]==-1){dfs(i,count);}
        }
    }
    
    void rev_dfs(ll where,ll count){
        group[where]=count;
        for(int i=0;i<rev[where].size();i++){
            ll t=rev[where][i];
            if(group[t]!=-1){continue;}
            rev_dfs(t,count);
        }
    }
    
    void second(){
        vector<pll> number;
        for(int i=0;i<V;i++){
            number.push_back({v[i],i});
        }
        sort(number.begin(),number.end(),greater<pll>());
        ll count=0;
        for(int i=0;i<V;i++){
            ll where=number[i].S;
            if(group[where]==-1){
                rev_dfs(where,count);
                count++;
            }
        }
    }
    
    void clear(ll a){
        for(ll i=a;i<V;i++){
            v[i]=-1;
            group[i]=-1;
        }
    }
    

    SCC(ll V=0):V(V){
        v.resize(V,-1);
        E.resize(V);
        rev.resize(V);
        group.resize(V,-1);
    }
    
    void add_edge(ll from,ll to){
        E[from].push_back(to);
        rev[to].push_back(from);
    }
    
    void add_node(){
        V++;
        v.resize(V);
        E.resize(V);
        rev.resize(V);
        group.resize(V);
    }
    
    void add_node(ll number){
        V+=number;
        v.resize(V);
        E.resize(V);
        rev.resize(V);
        group.resize(V);
    }
    
    vector<ll> solve(){
        clear();
        first();
        second();
        return group;
    }
    
    //グラフの形を保ったまま初期化
    void clear(){
        for(int i=0;i<V;i++){
            v[i]=-1;
            group[i]=-1;
        }
    }
};



int main(){
    while(1){
    for(int i=0;i<27;i++){
        for(int t=0;t<27;t++){
            edge[i][t]=false;
        }
    }
    ll n;
    cin>>n;
        if(n==0){break;}
    vector<string> a(n);
    for(auto &i:a){cin>>i;}
    for(int i=0;i<26;i++){
        edge[26][i]=true;
    }
    for(int i=1;i<n;i++){
        if(a[i]==a[i-1]){continue;}
        int t=0;
        while(t<a[i].size() && t<a[i-1].size() && a[i][t]==a[i-1][t]){t++;}
        if(t==a[i].size()){edge[a[i-1][t]-'a'][26]=true;}
        else if(t==a[i-1].size()){edge[26][a[i][t]-'a']=true;}
        else{edge[a[i-1][t]-'a'][a[i][t]-'a']=true;}
    }
    SCC G(27);
    for(int i=0;i<27;i++){
        for(int t=0;t<27;t++){
            if(edge[i][t]){G.add_edge(i,t);}
        }
    }
    G.solve();
    vector<ll> count(27,0);
    bool j=true;
    for(auto &i:G.group){
        count[i]++;
        if(count[i]>=2){j=false; break;}
    }
    cout<<(j?"yes":"no")<<endl;
    }
    
    
    
    return 0;
}



Measured memory_bytes: 3268