#include "bits/stdc++.h"

using namespace std;

typedef long long ll;
typedef pair<int,int> P;
const double EPS = 1e-12;
const int INF = numeric_limits<int>::max()/2;
const int MOD = 1e9+7;

using graph = vector<vector<int>>;
 
void dfs(int v, const graph& G, vector<int>& res, vector<int>& used) {
    used[v] = 1;
    for (auto to : G[v]) if (used[to] == 0) {
        dfs(to, G, res, used);
    }
    res.push_back(v);
    //cout<<v<<endl;
}
 
vector<int> topo_sort(const graph& G) {
    int V = G.size();
    vector<int> ide(V);
    for (int i = 0; i < V; i++) {
        for (auto to : G[i]) {
            //cout<<to<<endl;
            ide[to]++;
        }
    }
    vector<int> res;
    vector<int> used(V);
    for (int i = V - 1; i >= 0; i--) {
        if (ide[i] == 0) {
            //cout<<i<<endl;
            dfs(i, G, res, used);
        }
    }
    if(res.size()==0) res={-1};
    reverse(res.begin(), res.end());
    return res;
}

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

    int n;
    while(cin>>n,n){
        vector<string> s(n);
        for(int i=0;i<n;i++) cin>>s[i];
        if(n==1){
            cout<<"yes"<<endl;
            continue;
        }
        graph g(26);
        for(int i=1;i<n;i++){
            int len=min(s[i-1].length(),s[i].length());
            for(int j=0;j<len;j++){
                if(s[i-1][j]==s[i][j]) continue;
                int st=s[i-1][j]-'a',gt=s[i][j]-'a';
                g[st].push_back(gt);
                break;
            }
        }
        vector<int> res=topo_sort(g);
        //cout<<res.size()<<endl;
        if(res.size()!=26){
            cout<<"no"<<endl;
            continue;
        }
        map<int,int> mp;
        for(int i=0;i<26;i++){
            mp[res[i]]=i;
        }
        for(int i=0;i<n;i++){
            int len=s[i].length();
            for(int j=0;j<len;j++){
                int idx=s[i][j]-'a';
                idx=mp[idx];
                s[i][j]='a'+idx;
            }
        }
        bool f=true;
        for(int i=1;i<n;i++){
            if(s[i-1]>s[i]) f=false;
        }
        if(f) cout<<"yes"<<endl;
        else cout<<"no"<<endl;
    }
}
