#include <iostream>
#include <vector>
#include <string>
using namespace std;

int N;
vector<vector<int>> v(26);
int vis[26] = {};

bool dfs(int n){
    vis[n] = -1;
    bool ok = true;
    for(auto x:v[n]){
        if(vis[x]==0) ok = ok && dfs(x);
        else if(vis[x]==-1) return false;
    }
    vis[n] = 1;
    return ok;
}

int main(){
    while(cin >> N && N){
        vector<string> S(N);
        for(int i=0;i<26;i++){
            v[i].clear();
            vis[i] = 0;
        }
        bool yes = true;
        for(int i=0;i<N;i++){
            cin >> S[i];
            if(i>=1){
                if(S[i-1].size()>S[i].size() && S[i-1].substr(0,S[i].size())==S[i]) yes = false;
                else{
                    int n = S[i-1].size(),m = S[i].size();
                    for(int j=0;j<min(n,m);j++){
                        if(S[i-1][j]!=S[i][j]){
                            v[S[i-1][j]-'a'].push_back(S[i][j]-'a');
                            break;
                        }
                    }
                }
            }
        }
        for(int i=0;i<26;i++) if(!vis[i]) yes = yes && dfs(i);
        cout << (yes? "yes":"no") << endl;
    }
}
