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

using namespace std;

using lint = long long;
using ldouble = long double;

bool solve() {
    int N;
    cin >> N;
    if (N == 0) return false;

    vector<string> S(N);
    for (auto& s : S) cin >> s;

    vector<vector<bool>> order(26, vector<bool>(26, false));
    // order[a][b] => a < b

    for (int i = 0; i < N - 1; ++i) {
        bool diff = false;
        for (int j = 0; j < min(S[i].length(), S[i + 1].length()); ++j) {
            if (S[i][j] != S[i + 1][j]) {
                order[S[i][j] - 'a'][S[i + 1][j] - 'a'] = true;
                diff = true;
                break;
            }
        }

        if (!diff && S[i].length() > S[i + 1].length()) {
            cout << "no" << endl;
            return true;
        }
    }

    for (int j = 0; j < 26; ++j) {
        for (int i = 0; i < 26; ++i) {
            for (int k = 0; k < 26; ++k) {
                if (order[i][j] && order[j][k]) order[i][k] = true;
            }
        }
    }

    for (int i = 0; i < 26; ++i) {
        if (order[i][i]) {
            cout << "no" << endl;
            return true;
        }
    }
    cout << "yes" << endl;
    return true;
}

int main() {
    while (solve()) {}
    return 0;
}

