#include<iostream>
#include<vector>
#include<algorithm>
#include<cstring>

using namespace std;

typedef pair<char,char> P;
typedef pair<int,int> Pii;

const int MAX = 30;
vector<Pii> E;

P comp(string a, string b){
  for(int i = 0; i < (int)min(a.length(), b.length()); i++)
    if(a[i] != b[i]) return P(a[i], b[i]);

  if(a.length() > b.length()) return P(a[b.length()], '?');
  if(a.length() < b.length()) return P('?', b[a.length()]);
  return P('?','?');
}

bool add_edge(const vector<string>& v){
  E.clear();

  for(int i = 0; i+1 < (int)v.size(); i++){
    P p = comp(v[i], v[i+1]);
    if(p == P('?', '?')) continue;
    if(p.second == '?') return false;
    if(p.first != '?') E.push_back(P(p.first-'a', p.second-'a'));
  }
  return true;
}

bool hasCircle(int N){
  
  vector<int> d(MAX, 0);
  for(int i = 0; i <= N; i++){
    bool update = false;
    for(int j = 0; j < (int)E.size(); j++)
      if(d[E[j].second] < d[E[j].first] + 1){
	d[E[j].second] = d[E[j].first]+1;
	update = true;
      }
    if(i == N && update) return true;
    if(!update) break;
  }
  return false;
}

bool solve(const vector<string>& v){
  if(!add_edge(v)) return false;
  return !hasCircle(v.size());
}

int main(){
  
  int N;
  while(cin >> N && N){
    vector<string> v(N);
    for(int i = 0; i < N; i++) cin >> v[i];
    cout << (solve(v)?"yes":"no") << endl;
  }
  return 0;
}