#include<bits/stdc++.h>
#define r(i,n) for(int i=0;i<n;i++)
using namespace std;
string s[501];
int d[26][26],n;
int main(){
  while(cin>>n,n){
    int ans=0,f=0;
    r(i,26)r(j,26)d[i][j]=1e8;
    r(i,n)cin>>s[i];
    r(i,n-1){
      r(j,s[i].size()){
        if(j>=s[i+1].size()){f++;break;}
        if(s[i][j]!=s[i+1][j]){
            d[s[i][j]-'a'][s[i+1][j]-'a']=-1;
            break;
        }
      }
    }
    r(k,26)r(i,26)r(j,26)d[i][j]=min(d[i][j],d[i][k]+d[k][j]);
    r(i,26)if(d[i][i]<0)ans++;
    cout<<(ans||f?"no":"yes")<<endl;
  }
}