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

int main() {
    int n;
    while(cin >> n, n) {
        vector<string> v(n);
        int max_len = 0;
        for(int i=0; i<n; ++i) {
            string s;
            cin >> s;
            v[i] = '0' + s;
            max_len = max(max_len, (int)v[i].length());
        }
        vector<vector<bool>> f(26, vector<bool>(26, false));
        bool ok = true;
        for(int i=1; i<max_len; ++i) {
            string prev;
            for(int j=0; j<n; ++j) {
                if(j != 0 && i == v[j].length() && prev == v[j].substr(0, i)) {
                    if(v[j-1].length() > v[j].length()) {
                        ok = false;
                        break;
                    }
                }
                if(i >= v[j].length()) {
                    continue;
                }
                if(j == 0) {
                    prev = v[j].substr(0, i);
                } else if(prev == v[j].substr(0, i)) {
                    if(v[j][i] != v[j-1][i]) {
                        f[v[j-1][i] - 'a'][v[j][i] - 'a'] = true;
                    }
                } else {
                    prev = v[j].substr(0, i);
                }
            }
            if(!ok) break;
        }
        for(int k=0; k<26; ++k) {
            for(int i=0; i<26; ++i) {
                for(int j=0; j<26; ++j) {
                    f[i][j] = (bool)f[i][j] || (bool)f[i][k] && (bool)f[k][j];
                }
            }
        }
        for(int i=0; i<26; ++i) {
            for(int j=0; j<26; ++j) {
                ok &= !((bool)f[i][j] && (bool)f[j][i]);
            }
        }
        cout << (ok ? "yes" : "no") << endl;
    }
}
