#include <bits/stdc++.h>

#define REP(i,n) for(int i=0;i<(int)(n);i++)

using namespace std;

int main() {
  while(1){
    int n;
    cin>>n;
    if(!n)break;
    vector<string> d(n);
    REP(i,n){
      string w;
      cin>>w;
      d[i] = w + string(11-w.size(), '`');
    }
    d.erase(unique(begin(d),end(d)),end(d));
    vector<vector<int>> dst(27,vector<int>(27,0));
    REP(i,n-1){
      REP(j,11){
        if(d[i][j] != d[i+1][j]) {
          dst[d[i][j]-'`'][d[i+1][j]-'`'] = 1;
          break;
        }
      }
    }
    REP(i,27)
      if(i) dst[0][i] = 1;
    REP(k,27)REP(i,27)REP(j,27) dst[i][j] = max(dst[i][j], dst[i][k] * dst[k][j]);
    bool ok = true;
    REP(i,27)
      if(dst[i][i]) ok = false;
    if (ok)
      cout << "yes" << endl;
    else
      cout << "no" << endl;
  }
  return 0;
}