// Original C++ solution (slower):
#include <cstdio>

#include <cstring>

#include <queue>

using std::queue;



const int N = 500 + 10;



int n;

char s[N][20];

int g[255][255];

int deg[255];

queue<int> Q;



bool topsort()

{

	while(!Q.empty()) Q.pop();

	for(int i = 0; i < 255; i++) if(deg[i] == 0) Q.push(i);

	int cnt = 0;

	while(!Q.empty())

	{

		int x = Q.front(); Q.pop(); cnt++;

		for(int i = 0; i < 255; i++)

			if(g[x][i] == 1)

			{

				deg[i]--;

				if(deg[i] == 0) Q.push(i);

			}

	}

	//printf("cnt = %d\n", cnt);

	return cnt == 255;

}



bool solve()

{

	memset(g, 0, sizeof(g));

	memset(deg, 0, sizeof(deg));

	for(int i = 2; i <= n; i++)

	{

		for(int j = 0; s[i][j] || s[i-1][j]; j++)

		{

			if(s[i][j] == s[i-1][j]) continue;

			if(!s[i][j]) return 0;

			char lesser = s[i-1][j], larger = s[i][j];

			if(g[larger][lesser] == 1) return 0;

			if(g[lesser][larger] == 0)

			{

				g[lesser][larger] = 1;

				deg[larger]++;

			}

			break;

		}

	}

	return topsort();

}



int main()

{

	while(scanf("%d", &n) == 1 && n)

	{

		memset(s, 0, sizeof(s));

		for(int i = 1; i <= n; i++) scanf("%s", s[i]);

		if(solve()) puts("yes"); else puts("no");

	}

	return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

#include<cstring>

#include<cmath>

#include<algorithm>

#include<iostream>

#include<queue>

#include<stack>

#include<vector>

#include<map>

#include<set>

#include<string>

using namespace std;

#define INF 0x3f3f3f3f

#define eps 1e-8

#define maxn 100005

#define mod 1000000009



char s[505][15];

vector<int>g[30];

int deg[30];

bool v[30];

void topo()

{

    queue<int>q;

    for(int i=0;i<26;i++)   if(deg[i]==0)   q.push(i);

    int all=0;

    while(!q.empty())

    {

        int now=q.front();

        if(v[now]==1)

        {

            q.pop();

            continue;

        }

        v[now]=1;

        all++;

        q.pop();

        for(int i=0;i<g[now].size();i++)

        {

            int temp=g[now][i];

            deg[temp]--;

            if(deg[temp]==0)    q.push(temp);

        }

    }

    if(all==26) printf("yes\n");

    else printf("no\n");

}

int main()

{

    while(1)

    {

        int n;

        scanf("%d",&n);

        if(n==0)    break;

        bool flag=0;

        for(int i=0;i<26;i++)   g[i].clear();

        for(int i=0;i<26;i++)

        {

            deg[i]=0;

            v[i]=0;

        }

        for(int i=0;i<n;i++)

        {

            scanf("%s",s[i]);

        }

        for(int i=0;i<n;i++)

        {

            for(int j=i+1;j<n;j++)

            {

                int leni=strlen(s[i]),lenj=strlen(s[j]);

                bool sign=0;

                for(int k=0;k<min(leni,lenj);k++)

                {

                    if(s[i][k]!=s[j][k])

                    {

                        g[s[i][k]-'a'].push_back(s[j][k]-'a');

                        deg[s[j][k]-'a']++;

                        sign=1;

                        break;

                    }

                }

                if(sign==0)

                {

                    if(leni>lenj)

                    {

                        flag=1;

                        break;

                    }

                }

            }

            if(flag==1) break;

        }

        if(flag==1) printf("no\n");

        else topo();



    }

}

// Fastest known solution for this problem: