#include <bits/stdc++.h>
using namespace std;
int edge[26][26];
vector<string> s;
int dfs(int l, int r, int dep) {
  int prev = l, ret = 1;
  for (int i = l; i < r - 1; ++i) {
    if (s[i][dep] != s[i + 1][dep]) {
      if (s[i][dep] != '$' && s[i + 1][dep] == '$') return 0;
      if (s[i][dep] != '$' && s[i + 1][dep] != '$') {
        edge[s[i][dep] - 'a'][s[i + 1][dep] - 'a'] = 1;
        ret &= dfs(prev, i + 1, dep + 1);
      }
      prev = i + 1;
    }
  }
  if (s[r - 1][dep] != '$') ret &= dfs(prev, r, dep + 1);
  return ret;
}
int main() {
  while (1) {
    int n;
    cin >> n;
    if (!n) return 0;
    for (int i = 0; i < 26; ++i) {
      for (int j = 0; j < 26; ++j) {
        edge[i][j] = 0;
      }
    }
    s.clear();
    s.resize(n);
    for (int i = 0; i < n; ++i) {
      cin >> s[i];
      int c = s[i].size();
      while (c++ < 100) {
        s[i] += "$";
      }
    }
    if (!dfs(0, n, 0)) {
      cout << "no\n";
      continue;
    }
    int ok = 1;
    for (int i = 0; i < 26; ++i) {
      vector<int> vis(26, 0);
      queue<int> q;
      q.push(i);
      vis[i] = 1;
      while (!q.empty()) {
        int p = q.front();
        q.pop();
        for (int j = 0; j < 26; ++j) {
          if (edge[p][j]) {
            if (vis[j]) {
              ok = 0;
              goto A;
            }
            vis[j] = 1;
            q.push(j);
          }
        }
      }
    }
  A:
    cout << (ok ? "yes\n" : "no\n");
  }
}
