#include <bits/stdc++.h>
using namespace std;
int n, slen[500], edge[26][26], f[500][500];
int ans;
string s[500];
int main() {
  while (1) {
    cin >> n;
    if (!n) break;
    ans = 1;
    for (int i = 0; i < n; i++) {
      cin >> s[i];
      slen[i] = s[i].size();
    }
    for (int i = 0; i < n; i++)
      for (int j = 0; j < n; j++) f[i][j] = 0;
    for (int i = 0; i < 26; i++)
      for (int j = 0; j < 26; j++) edge[i][j] = 0;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < 10; j++) {
        if (slen[i] < j + 1) continue;
        for (int k = i + 1; k < n; k++) {
          if (f[i][k]) {
            if (slen[k] == j + 1 && slen[i] > slen[k]) ans = 0;
            continue;
          }
          if (slen[k] < j + 1) continue;
          int i1 = s[i][j] - 'a';
          int i2 = s[k][j] - 'a';
          if (i1 == i2) continue;
          if (i1 != i2) f[i][k] = 1;
          edge[i1][i2] = 1;
        }
      }
    }
    for (int i = 0; i < 26; i++)
      for (int j = 0; j < 26; j++)
        if (edge[i][j] && edge[j][i]) ans = 0;
    if (ans)
      cout << "yes" << endl;
    else
      cout << "no" << endl;
  }
  return 0;
}
