import std.stdio;
import std.ascii;
import std.range;
import std.array;
import std.functional;
import std.algorithm;
import std.conv;
import std.container;
import std.math;
import std.numeric;
import std.string;
import std.c.string;
import std.random;
import std.regex;
import std.typecons;

void main() {
    int N;
    string[] s;
    bool input() {
        scanf("%d\n", &N);
        if (N == 0) return false;
        s = new string[N];
        foreach (i; 0 .. N) {
            s[i] = readln.chomp;
        }
        return true;
    }
    void solve() {
        auto G = new int[][N];
        auto rG = new int[][N];
        bool dfs(int[][] g, int a, int b) {
            if (a == b) return true;
            foreach (n; g[a]) {
                if (dfs(g, n, b)) return true;
            }
            return false;
        }
        bool C(in string A, in string B) {
            auto L = min(A.length, B.length);
            if (B.startsWith(A)) return true;
            if (A.startsWith(B)) return false;
            foreach (i; 0 .. L) {
                char a = A[i],
                     b = B[i];
                if (a == b) continue;
                int ai = cast(int)(a - 'a'),
                    bi = cast(int)(b - 'a');
                if (dfs(G, ai, bi)) return true;
                if (dfs(rG, ai, bi)) return false;
                G[ai] ~= bi;
                rG[bi] ~= ai;
                return true;
            }
            return true;
        }
        bool check() {
            foreach (i; 0 .. N - 1) {
                //writeln(s[i], " ", s[i + 1]);
                if (!C(s[i], s[i + 1])) return false;
            }
            return true;
        }
        writeln(check ? "yes" : "no");
        //foreach (L; F) writeln(L.map!((a) => a < 0 ? '?' : a == 0 ? 'x' : 'o'));
    }
    while (input) solve;
}