#include <bits/stdc++.h>
using namespace std;
bool G[26][26];
bool f[26];
bool ans;
void dfs(long long now) {
  if (f[now]) {
    ans = false;
    return;
  }
  f[now] = true;
  for (long long i = 0; i < 26; i++) {
    if (G[now][i]) dfs(i);
  }
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n;
  while (cin >> n, n) {
    vector<string> s(n);
    ans = true;
    for (long long i = 0; i < 26; i++)
      for (long long j = 0; j < 26; j++) G[i][j] = false;
    for (long long i = 0; i < n; i++) {
      cin >> s[i];
    }
    for (long long i = 0; i < n - 1; i++) {
      long long lm = min(s[i].size(), s[i + 1].size());
      bool same = true;
      for (long long j = 0; j < lm; j++) {
        if (s[i][j] == s[i + 1][j])
          continue;
        else {
          same = false;
          G[s[i][j] - 'a'][s[i + 1][j] - 'a'] = true;
          break;
        }
      }
      if (same) {
        if (s[i].size() > s[i + 1].size()) {
          ans = false;
          break;
        }
      }
    }
    for (long long i = 0; i < 26; i++) {
      memset(f, false, sizeof(f));
      dfs(i);
    }
    if (ans)
      cout << "yes" << endl;
    else
      cout << "no" << endl;
  }
}
