#include <bits/stdc++.h>
using namespace std;


int main() {
  for(int n; cin >> n && n; ) {
    vector<string> v(n);
    for(int i = 0; i < n; ++i) cin >> v[i];
    try {
      vector<int> s, t;
      for(int i = 0; i+1 < n; ++i) {
        const string &a = v[i], &b = v[i+1];
        int l = min(a.size(), b.size());
        if(a.substr(0, l) == b.substr(0, l) &&
           a.size() > b.size()) {
          throw "no";
        }
        for(int j = 0; j < l; ++j) {
          if(a[j] != b[j]) {
            s.push_back(a[j]-'a');
            t.push_back(b[j]-'a');
            break;
          }
        }
      }
      vector<int> w(26, 0);
      for(int k = 0; k < 26; ++k) {
        bool update = false;
        for(int i = 0; i < s.size(); ++i) {
          if(w[t[i]] > w[s[i]] - 1) {
            w[t[i]] = w[s[i]] - 1;
            update = true;
          }
        }
        if(!update) throw "yes";
        if(k+1 == 26) throw "no";
      } 
    } catch(const char *s) {
      cout << s << endl;
    }
  }
  return 0;
}