#include <bits/stdc++.h>
using namespace std;
bool vis[30];
bool par[30][30];
char c[505][15];
int diff(char* A, char* B, int len1, int len2) {
  int mark = 0, i;
  for (i = 0; i < len1 && i < len2; i++) {
    if (A[i] != B[i]) {
      return i;
    }
  }
  return -1;
}
int main() {
  int n, mark;
  char last;
  while (scanf("%d", &n) != EOF && n) {
    mark = 0;
    memset(par, false, sizeof(par));
    memset(vis, false, sizeof(vis));
    for (int i = 0; i < n; i++) scanf("%s", c[i]);
    for (int i = 0; i < n; i++) {
      if (i > 0 && c[i - 1][0] == c[i][0]) {
        int len1 = strlen(c[i - 1]), len2 = strlen(c[i]);
        int pos = diff(c[i - 1], c[i], len1, len2);
        if (pos > 0 && pos < len1 && pos < len2)
          par[c[i - 1][pos] - 'a'][c[i][pos] - 'a'] = true;
        else if (len1 > len2) {
          int pos1 = diff(c[i], c[i - 1], len2, len1);
          if (pos1 == -1) {
            mark = 1;
          }
        }
      } else if (i > 0)
        par[c[i - 1][0] - 'a'][c[i][0] - 'a'] = true;
    }
    for (int i = 0; i < 27; i++) {
      for (int j = 0; j < i; j++) {
        if (par[i][j] && par[j][i]) {
          mark = 1;
          break;
        }
      }
      if (mark) break;
    }
    if (mark)
      printf("no\n");
    else
      printf("yes\n");
  }
  return 0;
}
