#include <bits/stdc++.h>
using namespace std;
int i, j, k, n, m, x, y, T, ans, big, cas, num, len[505];
bool flag;
queue<int> q;
int ru[505], G[30][30], vis[30];
char s[505][15];
int main() {
  while (scanf("%d", &n), n) {
    memset(ru, 0, sizeof(ru));
    memset(G, 0, sizeof(G));
    memset(vis, 0, sizeof(vis));
    for (i = 0; i < n; i++) {
      scanf("%s", &s[i]);
      len[i] = strlen(s[i]);
    }
    int ii = 0;
    for (i = 0; i < n; i++) {
      for (j = i + 1; j < n; j++) {
        int mi = min(len[i], len[j]);
        flag = false;
        for (k = 0; k < mi; k++) {
          if (s[i][k] != s[j][k]) {
            int p = s[i][k] - 'a';
            int q = s[j][k] - 'a';
            G[p][q] = 1;
            flag = true;
            break;
          }
        }
        if (!flag && len[i] > len[j]) {
          printf("No\n");
          ii = 1;
          break;
        }
      }
      if (ii == 1) break;
    }
    if (ii == 1) continue;
    for (i = 0; i < 26; i++) {
      for (j = 0; j < 26; j++) {
        ru[j] += G[i][j];
      }
    }
    while (!q.empty()) q.pop();
    for (i = 0; i < 26; i++) {
      if (!ru[i]) {
        q.push(i);
        vis[i] = 1;
      }
    }
    while (!q.empty()) {
      int u = q.front();
      q.pop();
      for (i = 0; i < 26; i++) {
        if (!vis[i] && G[u][i]) {
          ru[i]--;
          if (ru[i] == 0) {
            q.push(i);
            vis[i] = 1;
          }
        }
      }
    }
    flag = false;
    for (i = 0; i < 26; i++) {
      if (ru[i] != 0) {
        flag = true;
        break;
      }
    }
    if (flag)
      printf("No\n");
    else
      printf("Yes\n");
  }
  return 0;
}
