#include <bits/stdc++.h>
using namespace std;
inline int toInt(string s) {
  int v;
  istringstream sin(s);
  sin >> v;
  return v;
}
template <class T>
inline string toString(T x) {
  ostringstream sout;
  sout << x;
  return sout.str();
}
template <class T>
inline T sqr(T x) {
  return x * x;
}
const double eps = 1e-10;
const double pi = acos(-1.0);
const long long INF = 1LL << 62;
const int inf = 1 << 29;
const int kNumAlphabets = 26;
vector<int> used;
vector<vector<int> > edge;
string res;
void dfs(int v) {
  if (used[v]) {
    res = "no";
    return;
  }
  used[v] = true;
  for (int u = (0); u < (kNumAlphabets); ++u) {
    if (edge[v][u]) dfs(u);
  }
}
int main(void) {
  for (int n; cin >> n, n; cout << res << endl) {
    res = "yes";
    edge = vector<vector<int> >(kNumAlphabets, vector<int>(kNumAlphabets));
    string pre;
    cin >> pre;
    for (int i = (0); i < (n - 1); ++i) {
      string cur;
      cin >> cur;
      for (int j = (0); j < (min(pre.size(), cur.size())); ++j) {
        bool same = true;
        if (pre.at(j) != cur.at(j)) {
          edge[pre.at(j) - 'a'][cur.at(j) - 'a'] = true;
          same = false;
          break;
        }
        if (same && cur.size() < pre.size()) res = "no";
      }
      pre = cur;
    }
    for (int u = (0); u < (kNumAlphabets); ++u) {
      used = vector<int>(kNumAlphabets);
      dfs(u);
    }
  }
  return 0;
}
