#include <bits/stdc++.h>
const int MAX_N = 1e5 + 5;
int n, m;
char s[MAX_N], p[256], c[256];
bool k[256];
int main() {
  scanf("%d", &n);
  while (n--) {
    scanf("%s", s);
    m = strlen(s);
    for (int i = 0; i < m; ++i) k[s[i]] = true;
    for (int i = 0; i + 1 < m; ++i)
      if (c[s[i]] && p[s[i + 1]] &&
          (c[s[i]] != s[i + 1] || p[s[i + 1]] != s[i])) {
        printf("NO\n");
        return 0;
      } else {
        c[s[i]] = s[i + 1];
        p[s[i + 1]] = s[i];
      }
  }
  for (char i = 'a'; i <= 'z'; ++i)
    if (!p[i] && k[i])
      for (char j = i; j; j = c[j]) printf("%c", j);
  printf("\n");
  return 0;
}
