/*
 * 2534.cc: 
 */

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
 
using namespace std;

/* constant */

const int MAX_N = 500;

typedef long long ll;

const int INF = 1 << 30;
const ll LINF = 1LL << 60;

/* typedef */

typedef vector<int> vi;
typedef queue<int> qi;
typedef pair<int,int> pii;

/* global variables */

string ss[MAX_N];

/* subroutines */

int cs[26][26];

/* main */

int main() {
  for (;;) {
    int n;
    cin >> n;
    if (n == 0) break;

    for (int i = 0; i < n; i++) cin >> ss[i];

    memset(cs, 0, sizeof(cs));

    bool ok = true;
    for (int i = 0; ok && i < n; i++) {
      for (int j = 0; ok && j < i; j++) {
	string &si = ss[i], &sj = ss[j];

	int k = 0;
	while (k < si.size() && k < sj.size() && si[k] == sj[k]) k++;
	if (k >= si.size()) ok = (k >= sj.size());
	else if (k < sj.size()) {
	  int ci = si[k] - 'a', cj = sj[k] - 'a';
	  if (cs[ci][cj] != 0) {
	    if (cs[ci][cj] < 0) ok = false;
	  }
	  else {
	    cs[ci][cj] = 1;
	    cs[cj][ci] = -1;
	  }
	}
	
	//printf("(%d,%d): ", i, j);
	//cout << si << ' ' << sj << ' ' << ok << endl;
      }
    }

    cout << (ok ? "yes" : "no") << endl;
  }

  return 0;
}