#include <iostream>
#include <algorithm>

#define rep(i, n) for(int i = 0; i < (n); ++i)

using namespace std;

int n;
string s[500];
bool g[26][26];
int h[26];

bool cycle(int i){
	h[i] = 1;
	rep(j, 26){
		if(!g[i][j]){
			continue;
		}
		if(h[j] == 0 && cycle(j) || h[j] == 1){
			return true;
		}
	}
	h[i] = 2;
	return false;
}

bool solve(){
	rep(i, n - 1){
		int p = s[i].size();
		int q = s[i + 1].size();

		bool same = true;
		rep(j, min(p, q)){
			char k = s[i][j];
			char l = s[i + 1][j];
			if(k != l){
				same = false;
				g[k - 'a'][l - 'a'] = true;
				break;
			}
		}
		if(same && p > q){
			return false;
		}
	}

	rep(i, 26){
		fill_n(h, 26, 0);
		if(cycle(i)){
			return false;
		}
	}
	return true;
}

int main(){
	while(cin >> n, n){
		rep(i, n){
			cin >> s[i];
		}

		cout << (solve() ? "yes" : "no") << endl;
		
		rep(i, 26){
			fill_n(g[i], 26, false);
		}
	}
	return 0;
}