#include <algorithm>
#include <iostream>
#include <vector>
#include <math.h>
#include <set>
#include <map>
#include <string>
#include <stack>
#include <queue>
#include <iomanip>
#include <numeric>
#include <tuple>
#include <bitset>
#include <complex>
#include <unistd.h>
#include <cassert>
#include <cctype>
#include <random>
#define _USE_MATH_DEFINES
#define _GLIBCXX_DEBUG
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> plglg;
typedef pair<double, ll> pdlg;
typedef tuple<int, int, int> tiii;
typedef tuple<ll, ll, ll> tlglglg;
typedef tuple<double, double, double> tddd;
typedef complex<double> xy_t;
#define REP(i, x, y) for(ll i = x; i < y; i++)
#define PER(i, x, y) for(ll i = x; i > y; i--)
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
double pi = 3.141592653589793;
ll mod = 1000000007;
int intmax = 2147483647;
int intmin = -2147483648;
ll llmax = 9223372036854775807;
ll llmin = -9223372036854775807;
int iinf = intmax / 8;
ll inf = llmax / 8;
double eps = 1e-11;

struct edge {
    ll to, cost;
};

int V;
vector<edge> G[30];

void addedge(int st, int ed, ll co) {
    edge e;
    e.to = ed;
    e.cost = co;
    G[st].push_back(e);
}

int h[30];
vector<int> tsorted;

//トポロジカルソート。結果はtsortedに入る。
bool tsort() {
    fill(h, h + V, 0);
    tsorted.clear();
    for (int i = 0; i < V; i++) {
        int len = G[i].size();
        for (int j = 0; j < len; j++) {
            h[G[i][j].to]++;
        }
    }
    queue<int> que;
    for (int i = 0; i < V; i++) {
        if (h[i] == 0) {
            que.push(i);
            tsorted.push_back(i);
        }
    }
    while (!que.empty()) {
        int p = que.front();
        que.pop();
        int len = G[p].size();
        for (int i = 0; i < len; i++) {
            int mark = G[p][i].to;
            h[mark]--;
            if (h[mark] == 0) {
                que.push(mark);
                tsorted.push_back(mark);
            }
        }
    }
    int sortedsize = tsorted.size();
    if (sortedsize == V) {
        return true;
    } else {
        return false;
    }
}

bool ed[30][30];

int main() {
    while (1) {
        ll n;
        cin >> n;
        V = 26;
        REP(i, 0, V) {
            G[i].clear();
        }
        if (n == 0) {
            break;
        }
        string s[n];
        REP(i, 0, n) {
            cin >> s[i];
        }
        REP(i, 0, V) {
            fill(ed[i], ed[i] + V, false);
        }
        bool ok = true;
        REP(i, 0, n - 1) {
            string s1 = s[i];
            string s2 = s[i + 1];
            ll len1 = s1.size();
            ll len2 = s2.size();
            bool tmp = false;
            REP(i, 0, min(len1, len2)) {
                if (s1[i] != s2[i]) {
                    ed[s1[i] - 'a'][s2[i] - 'a'] = true;
                    tmp = true;
                    break;
                }
            }
            if (!tmp) {
                if (len1 > len2) {
                    ok = false;
                    break;
                }
            }
        }
        REP(i, 0, V) {
            REP(j, 0, V) {
                if (ed[i][j]) {
                    addedge(i, j, 1);
                }
            }
        }
        bool tmp2 = tsort();
        if (!tmp2) {
            ok = false;
        }
        if (ok) {
            cout << "yes" << endl;
        } else {
            cout << "no" << endl;
        }
    }
}



Measured memory_bytes: 3056