#include <bits/stdc++.h>
using namespace std;
int grap[30][30];
char ch1[520][20];
int c = 1, n;
int pre[30];
int vis[30];
void init() {
  memset(grap, 0, sizeof(grap));
  memset(vis, 0, sizeof(vis));
  memset(pre, 0, sizeof(pre));
}
bool panduan(int p) {
  int i;
  int x = strlen(ch1[p - 1]), y = strlen(ch1[p]);
  int z = x < y ? x : y;
  for (i = 0; i < z; i++)
    if (ch1[p - 1][i] != ch1[p][i]) break;
  if (i == z) {
    if (x > y) return false;
    return true;
  }
  x = ch1[p - 1][i] - 'a' + 1, y = ch1[p][i] - 'a' + 1;
  vis[x] = vis[y] = 1;
  grap[x][y] = 1;
  return true;
}
bool dfs(int u) {
  if (pre[u]) return false;
  pre[u] = 1;
  for (int i = 1; i <= 26; i++) {
    if (grap[u][i]) {
      if (pre[i]) return false;
      if (!dfs(i)) return false;
    }
  }
  return true;
}
int main() {
  while (scanf("%d", &n) && n) {
    init();
    int i;
    bool bz = true;
    scanf("%s", ch1[0]);
    for (i = 1; i < n; i++) {
      scanf("%s", ch1[i]);
      int len1 = strlen(ch1[i - 1]);
      int len2 = strlen(ch1[i]);
      int j;
      for (j = 0; j < len1 && j < len2; j++) {
        if (ch1[i - 1][j] != ch1[i][j]) {
          int a = ch1[i - 1][j] - 'a' + 1;
          int b = ch1[i][j] - 'a' + 1;
          if (!vis[a]) {
            vis[a] = 1;
          }
          if (!vis[b]) {
            vis[b] = 1;
          }
          if (grap[a][b] == 0) {
            grap[a][b] = 1;
          }
          break;
        }
      }
      if (j == len2 && j < len1) {
        bz = false;
      }
    }
    if (n == 1) {
      cout << "yes" << endl;
      continue;
    }
    if (!bz) {
      cout << "no" << endl;
      continue;
    }
    for (i = 1; i < 30; i++)
      if (!pre[i] && vis[i]) {
        memset(pre, 0, sizeof(pre));
        bz = dfs(i);
        if (!bz) break;
      }
    if (bz)
      cout << "yes" << endl;
    else
      cout << "no" << endl;
  }
  return 0;
}
