#include <iostream>
#include <algorithm>
#include <vector>
#include <string>

using namespace std;

#define loop(i,a,b) for(int i=(a); i<(int)(b); i++)
#define rep(i,b) loop(i,0,b)

bool isPrefix(const string& a, const string &b){
    if(a.size() <= b.size()){
        rep(i, a.size()){
            if(a[i] == b[i]) continue;
            else return false;
        }
    } else {
        return false;
    }
    return true;
}

bool solve(int n){
    vector<string> v(n);
    int G[26][26] = {};
    rep(i, n) cin >> v[i];
    loop(i, 1, n){
        if(isPrefix(v[i - 1], v[i])){
            continue;
        } else if(isPrefix(v[i], v[i - 1])){
            return false;
        } else {
            rep(j, min(v[i].size(), v[i - 1].size())){
                char a = v[i][j], b = v[i - 1][j];
                if(a == b){
                    continue;
                } else {
                    G[a - 'a'][b - 'a'] = true;
                    break;
                }
            }
        }
    }
    rep(k, 26) rep(i, 26) rep(j, 26){
        G[i][j] |= G[i][k] && G[k][j];
    }
    
    rep(i, 26){
        if(G[i][i])	return false;
    }
    return true;
}

int main(){
    int n;
    while(cin >> n, n){
        if(solve(n)){
            cout << "yes";
        } else {
            cout << "no";
        }
        cout << endl;
    }
}