#include <iostream>
#include <vector>
#include <cstring>
#include <algorithm>
using namespace std;

int n;
int order[128][128];
vector<string> t;

//[from, to] not [from, to)
bool check(int x, int from, int to){
  for(int i = from; i <= to; i++){
    if(t[i].size() <= x) continue;

    for(int j = i + 1; j <= to; j++){
      if(t[j].size() <= x) return false;

      char a = t[i][x];
      char b = t[j][x];

      if(a != b && order[a][b] != 0 && order[a][b] == 1){
        return false;
      }
      order[a][b] = -1;
      order[b][a] = +1;
    }
  }

  int i = from;
  while(i <= to && t[i].size() <= x) i++;

  for( ; i <= to; i++){
    int j = i;
    for( ; j <= to && t[i][x] == t[j][x]; j++);
    if(!check(x + 1, i, j - 1)) return false;
    i = j - 1;
  }

  return true;
}

int main(){
  while(cin >> n, n){
    t.clear();

    for(int i = 0; i < n; i++){
      string s;
      cin >> s;
      t.push_back(s);
    }

    memset(order, 0, sizeof(order));

    cout << (check(0, 0, n - 1) ? "yes" : "no") << endl;
  }
}