#include <bits/stdc++.h>
using namespace std;
int n;
string s[500];
bool g[26][26];
int h[26];
bool cycle(int i) {
  h[i] = 1;
  for (int j = 0; j < (26); ++j) {
    if (!g[i][j]) {
      continue;
    }
    if (h[j] == 0 && cycle(j) || h[j] == 1) {
      return true;
    }
  }
  h[i] = 2;
  return false;
}
bool solve() {
  for (int i = 0; i < (n - 1); ++i) {
    int p = s[i].size();
    int q = s[i + 1].size();
    bool same = true;
    for (int j = 0; j < (min(p, q)); ++j) {
      char k = s[i][j];
      char l = s[i + 1][j];
      if (k != l) {
        same = false;
        g[k - 'a'][l - 'a'] = true;
        break;
      }
    }
    if (same && p > q) {
      return false;
    }
  }
  return !cycle(0);
}
int main() {
  while (cin >> n, n) {
    for (int i = 0; i < (n); ++i) {
      cin >> s[i];
    }
    cout << (solve() ? "yes" : "no") << endl;
    for (int i = 0; i < (26); ++i) {
      fill_n(g[i], 26, false);
    }
    fill_n(h, 26, 0);
  }
  return 0;
}
