#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
using namespace std;

vector<int> edge[150];
bool come[150];
int dfs(int x, int k, int p = 1){
	if(k == x && p != 0)return -1;
	if(come[x])return 0;
	come[x] = true;
	for(int i = 0;i < edge[x].size();i++){
		if(dfs(edge[x][i], k) == -1)return -1;
	}
	return 0;
}

bool ok(){
	for(int i = 'a';i <= 'z';i++){
		fill(come, come + 150, false);
		if(dfs(i, i, 0) == -1)return false;
	}
	return true;
}

int main(){
	int n;
	string str, last;
	while(cin >> n, n){
	
		bool fail = false;
		for(int i = 'a';i <= 'z';i++)edge[i].clear();
		for(int i = 0;i < n;i++){
			cin >> str;
			if(i){
				for(int i = 0;i < last.size();i++){
					if(i == str.size()){
						fail = true;
						break;
					}
					if(str[i] != last[i]){
						edge[last[i]].push_back(str[i]);
						break;
					}
				}
			}
			last = str;
		}
		
		cout << ((!fail&&ok())?"yes":"no") << endl;
	}
	return 0;
}