#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n, n) {
    vector<string> s(n);
    for (int i = 0; i < (int)(n); ++i) cin >> s[i];
    bool t[26][26] = {};
    for (int i = 0; i < (int)(n - 1); ++i) {
      string s1 = s[i];
      string s2 = s[i + 1];
      for (int j = 0; j < (int)(s1.length()); ++j) {
        if ((int)s2.length() <= j) {
          cout << "no" << endl;
          goto NEXT;
        }
        if (s1[j] != s2[j]) {
          t[s1[j] - 'a'][s2[j] - 'a'] = true;
          break;
        }
      }
    }
    for (int i = 0; i < (int)(26); ++i)
      for (int j = 0; j < (int)(26); ++j)
        for (int k = 0; k < (int)(26); ++k) t[j][k] |= t[j][i] && t[i][k];
    for (int i = 0; i < (int)(n); ++i) {
      if (t[i][i]) {
        cout << "no" << endl;
        goto NEXT;
      }
    }
    cout << "yes" << endl;
  NEXT : {}
  }
}
