#include <bits/stdc++.h>
template<typename T>
struct Edge {
    int from, to;
    T cost;
    Edge(int from, int to, T cost) {
        this->from = from;
        this->to = to;
        this->cost = cost;
    }
};
bool operator == (Edge<int> e1, Edge<int> e2) {
    return e1.from == e2.from &&
            e1.to == e2.to &&
            e1.cost == e2.cost;
}
template<typename T>
using Edges = std::vector<Edge<T>>;
template<typename T>
using Graph = std::vector<Edges<T>>;
template<typename T>
std::vector<int> topological_sort(const Graph<T> &graph) {
    Graph<T> g = graph;
    int n = g.size();
    std::vector<int> res;
    std::queue<int> que;
    std::vector<int> in(n);
    std::vector<bool> used(n, false);
    for(int i=0;i<n;++i) {
        for(int j=0;j<(int)(g[i].size());++j) {
            in[g[i][j].to]++;
        }
    }
    for(int i=0;i<n;++i) {
        if(in[i] == 0) que.push(i);
    }
    if((int)(que.size()) == 0) res.push_back(-1);
    while(!que.empty()) {
        int now = que.front(); que.pop();
        if(used[now]) {
            res.clear();
            res.push_back(-1);
            return res;
        }
        used[now] = true;
        res.push_back(now);
        for(int i=0;i<(int)(g[now].size());++i) {
            int next = g[now][i].to;
            if(in[next] == 1) {
                que.push(next);
        }
            in[next]--;
        }
    }
    return res;
}
using namespace std;
using ll = long long;
using P = pair<int, int>;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
const double eps = 1e-10;
const int MOD = 1000000007;
const int INF = 1000000000;
const ll LINF = 1ll<<50;
template<typename T>
void printv(const vector<T>& s) {
  for(int i=0;i<(int)(s.size());++i) {
    cout << s[i];
    if(i == (int)(s.size())-1) cout << endl;
    else cout << " ";
  }
}
int main() {
  cin.tie(0);
  cout << fixed << setprecision(10);
  while(1) {
    int n; cin >> n;
    if(n == 0) break;
    Graph<int> g(26);
    map<P, bool> sel;
    vector<string> vs(n);
    for(int i=0;i<n;++i) {
      cin >> vs[i];
    }
    if(n == 1) {
      cout << "yes" << endl;
      continue;
    }
    string s1 = vs[0];
    bool ok = true;
    for(int i=1;i<n;++i) {
      string s2 = vs[i];
      bool upd = false;
      for(int j=0;j<min((int)(s1.size()), (int)(s2.size()));++j) {
        if(s1[j] != s2[j]) {
          int a = (int)(s1[j] - 'a'), b = (int)(s2[j] - 'a');
          upd = true;
          if(!sel[{a, b}]) {
            sel[{a, b}] = true;
            g[a].push_back(Edge<int>(a, b, 1));
          }
          break;
        }
      }
      if(!upd && (int)(s1.size()) > (int)(s2.size())) {
        ok = false;
        break;
      }
      s1 = s2;
    }
    if(!ok) {
      cout << "no" << endl;
      continue;
    }
    vector<int> tmp = topological_sort(g);
    if((int)(tmp.size()) < 26) {
      cout << "no" << endl;
    } else {
      cout << "yes" << endl;
    }
  }
}

