#include <bits/stdc++.h>
#define N ('z'-'a')
using namespace std;
int n,ans,mp[N+1];
string str[501];

void mk_mp(int pos,int i,int j){
  while(i<=j&&!str[i][pos])i++;
  if(i>=j)return;
  int ni=i,ch=str[i][pos]-'a';

  while(i<j&&ch==str[++i][pos]-'a')if(str[i-1][pos+1]&&!str[i][pos+1])ans=0;
  mk_mp(pos+1,ni,i-1);

  int a=str[i][pos]-'a';
  if(ch!=a){
    mk_mp(pos,i,j);
    mp[ch]|=(1<<a|mp[a]);
    ans*=!(mp[ch]&1<<ch);
  }

}

int main(){
  while(cin>>n,n){
    memset(mp,0,sizeof(mp));
    for(int i=0;i<n;i++)cin>>str[i];
    ans=1;
    mk_mp(0,0,n-1);
    cout <<(ans? "yes":"no")<<endl;
  }
  return 0;
}