#include <bits/stdc++.h>
int n;
char seq[26][26];
char word[11];
char prev_word[11];
int set_seq(char prev[], char word[]) {
  char p, c;
  int i;
  while (*prev == *word && *prev && *word) prev++, word++;
  p = *prev;
  c = *word;
  if (!p && c)
    return (0);
  else if (p && !c)
    return (1);
  if (p && c) {
    p -= 'a';
    c -= 'a';
    if (seq[p][c] == -1) return (1);
    for (i = 0; i < 26; i++) {
      if (seq[p][i] == 1 && seq[i][c] == 1 && seq[p][c] == -1) return (0);
      if (seq[i][c] == 1 && seq[c][p] == 1 && seq[i][p] == -1) return (0);
      if (seq[c][i] == 1 && seq[i][p] == 1 && seq[c][p] == -1) return (0);
    }
    seq[p][c] = 1;
    seq[c][p] = -1;
  }
  return (0);
}
int main() {
  int i, ret;
  while (scanf("%d", &n) && n) {
    memset(seq, 0, sizeof(seq));
    scanf("%s", prev_word);
    ret = 0;
    for (i = 0; i < n - 1; i++) {
      scanf("%s", word);
      if (ret == 0) ret = set_seq(prev_word, word);
      strcpy(prev_word, word);
    }
    printf("%s\n", ((ret == 0) ? "yes" : "no"));
  }
  return (0);
}
