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

int main()
{
  int N;
  while(cin >> N, N) {
    vector< string > s(N);
    
    bool flag = true;
    for(int i = 0; i < N; i++) cin >> s[i];
    bool graph[26][26] = {{}};
    for(int i = 1; i < N; i++) {
      bool update = false;
      for(int j = 0; j < min(s[i - 1].size(), s[i].size()); j++) {
        if(s[i - 1][j] != s[i][j]) {
          graph[s[i - 1][j] - 'a'][s[i][j] - 'a'] = true;
          update = true;
          break;
        }
      }
      flag &= update | (s[i - 1].size() <= s[i].size());
    }
    for(int k = 0; k < 26; k++) {
      for(int i = 0; i < 26; i++) {
        for(int j = 0; j < 26; j++) {
          graph[i][j] |= graph[i][k] & graph[k][j];
        }
        flag &= !graph[i][i];
      }
    }
    if(flag) cout << "yes" << endl;
    else cout << "no" << endl;
  }
}