#include <bits/stdc++.h>
using namespace std;
int degree[30];
int n;
int grid[30][30];
char str[550][20];
int vis[30];
int que[30];
int main() {
  while (scanf("%d", &n)) {
    if (n == 0) break;
    memset(degree, 0, sizeof(degree));
    memset(grid, 0, sizeof(grid));
    memset(vis, 0, sizeof(vis));
    scanf("%s", str[0]);
    bool flag = true;
    for (int i = 1; i < n; i++) {
      scanf("%s", str[i]);
      int len1 = strlen(str[i - 1]);
      int len2 = strlen(str[i]);
      int j;
      for (j = 0; j < len1 && j < len2; j++) {
        if (str[i - 1][j] != str[i][j]) {
          int a = str[i - 1][j] - 'a';
          int b = str[i][j] - 'a';
          if (!vis[a]) {
            vis[a] = 1;
          }
          if (!vis[b]) {
            vis[b] = 1;
          }
          if (grid[a][b] == 0) {
            degree[b]++;
            grid[a][b] = 1;
          }
          break;
        }
      }
      if (j == len2 && j < len1) {
        flag = false;
      }
    }
    if (n == 1) {
      printf("yes\n");
      continue;
    }
    if (!flag) {
      printf("no\n");
      continue;
    }
    int l = 0, r = 0;
    for (int i = 0; i < 30; i++)
      if (vis[i] && degree[i] == 0) {
        que[r++] = i;
      }
    if (r == 0) {
      printf("no\n");
      continue;
    }
    while (l < r) {
      int u = que[l++];
      degree[u] = -1;
      for (int i = 0; i < 30; i++) {
        if (vis[i] && grid[u][i] && degree[i] != -1) {
          degree[i]--;
          if (degree[i] == 0) {
            que[r++] = i;
          }
        }
      }
    }
    for (int i = 0; i < 30; i++) {
      if (degree[i] != -1 && vis[i]) {
        flag = false;
        break;
      }
    }
    if (!flag)
      printf("no\n");
    else
      printf("yes\n");
  }
  return 0;
}
