#include <bits/stdc++.h>
char str[100005][30];
int ns[100005];
int intr[30];
int rem;
int n;
int find_first() {
  int i;
  int bst = -1;
  for (i = 0; i < n; i++) {
    if (ns[i] > 0 && intr[str[i][0] - 'a'] == 0 &&
        (bst == -1 || str[i][0] < str[bst][0]))
      bst = i;
  }
  return bst;
}
int main() {
  int i, j, k;
  char inp[100005];
  int seen[30];
  char out[30];
  char used[30];
  int o, m;
  for (i = 0; i < 100005; i++) ns[i] = 0;
  for (i = 0; i < 30; i++) intr[i] = used[i] = 0;
  scanf("%d", &n);
  rem = n;
  for (i = 0; i < n; i++) {
    scanf("%s", inp);
    for (j = 0; j < 30; j++) seen[j] = 0;
    for (j = 0; inp[j] != '\0'; j++) {
      if (seen[inp[j] - 'a']) {
        printf("NO\n");
        return 0;
      }
      if (j > 0) intr[inp[j] - 'a'] = 1;
      seen[inp[j] - 'a'] = 1;
      str[i][j] = inp[j];
      ns[i]++;
    }
    str[i][ns[i]] = '\0';
  }
  for (o = 0, m = 0; rem > 0; o++) {
    if (m == o) {
      int c = find_first();
      if (c == -1) {
        printf("NO\n");
        return 0;
      }
      if (used[str[c][0] - 'a']) {
        printf("NO\n");
        return 0;
      }
      used[str[c][0] - 'a'] = 1;
      out[m] = str[c][0];
      m++;
    }
    for (i = 0; i < n; i++) {
      if (str[i][0] != out[o] || ns[i] == 0) continue;
      for (j = 0; j < ns[i]; j++) {
        if (j < m - o) {
          if (str[i][j] != out[o + j]) {
            printf("NO\n");
            return 0;
          }
        } else {
          if (used[str[i][j] - 'a']) {
            printf("NO\n");
            return 0;
          }
          used[str[i][j] - 'a'] = 1;
          out[m] = str[i][j];
          m++;
        }
      }
      ns[i] = 0;
      rem--;
    }
  }
  out[m] = '\0';
  printf("%s\n", out);
  return 0;
}
