#include <bits/stdc++.h>
using namespace std;
template <class T>
inline string toString(const vector<T>& x) {
  stringstream ss;
  for (int i = 0; i < (int)(x.size()); ++i) {
    if (i != 0) ss << " ";
    ss << x[i];
  }
  return ss.str();
}
template <class T>
inline string toString(const vector<vector<T> >& map) {
  stringstream ss;
  for (int i = 0; i < (int)(map.size()); ++i) {
    if (i != 0) ss << "\n";
    ss << toString(map[i]);
  }
  return ss.str();
}
template <class K, class V>
string toString(map<K, V>& x) {
  string res;
  stringstream ss;
  for (auto& p : x) ss << p.first << ":" << p.second << " ";
  return ss.str();
}
string BITtoString(int bit) {
  stringstream ss;
  while (bit != 0) {
    ss << (bit % 2);
    bit /= 2;
  }
  string res = ss.str();
  reverse((res).begin(), (res).end());
  return res;
}
template <typename T, typename V>
inline T pmod(T v, V MOD) {
  return (v % MOD + MOD) % MOD;
}
namespace Sccs {
struct Edge {
  int to;
  Edge(int to) : to(to){};
};
using Graph = vector<vector<Edge> >;
class Scc {
 private:
  int V;
  Graph g, rg;
  vector<bool> used;
  void dfs(int v) {
    used[v] = true;
    for (auto e = (g[v]).begin(); e != (g[v]).end(); ++e)
      if (!used[e->to]) dfs(e->to);
    vs.push_back(v);
  }
  void rdfs(int v, int k) {
    used[v] = true;
    cmp[v] = k;
    for (auto e = (rg[v]).begin(); e != (rg[v]).end(); ++e)
      if (!used[e->to]) rdfs(e->to, k);
  }

 public:
  vector<int> vs, cmp;
  Scc(int V) : V(V) {
    g = Graph(V);
    rg = Graph(V);
    vs = vector<int>(V);
    cmp = vector<int>(V);
    used = vector<bool>(V);
  }
  void add_edge(int f, int t) {
    g[f].push_back(t);
    rg[t].push_back(f);
  }
  int scc() {
    fill((used).begin(), (used).end(), false);
    vs.clear();
    for (int v = 0; v < (int)(V); ++v)
      if (!used[v]) dfs(v);
    fill((used).begin(), (used).end(), false);
    int k = 0;
    for (int i = vs.size() - 1; i >= 0; i--)
      if (!used[vs[i]]) rdfs(vs[i], k++);
    return k;
  }
  bool same(int i, int j) { return cmp[i] == cmp[j]; }
};
}  // namespace Sccs
using namespace Sccs;
class Main {
 public:
  void run() {
    while (true) {
      int N;
      cin >> N;
      if (N == 0) break;
      vector<string> ss(N);
      for (int i = 0; i < (int)(N); ++i) cin >> ss[i];
      bool ok = true;
      Scc scc(26);
      for (int i = 0; i + 1 < N; i++) {
        for (int c = 0; true; c++) {
          if ((c < ss[i].size()) && !(c < ss[i + 1].size())) {
            ok = false;
          }
          if (!(c < min(ss[i].size(), ss[i + 1].size()))) break;
          if (ss[i][c] != ss[i + 1][c]) {
            scc.add_edge(ss[i][c] - 'a', ss[i + 1][c] - 'a');
            break;
          }
        }
      }
      scc.scc();
      for (int i = 0; i < (int)(26); ++i)
        for (int j = 0; j < (int)(26); ++j)
          if (i != j) {
            if (scc.same(i, j)) ok = false;
          }
      cout << (ok ? "yes" : "no") << endl;
    }
  }
};
int main() {
  cout << fixed << setprecision(13);
  ios::sync_with_stdio(false);
  Main().run();
  return 0;
}
