#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 100000;
char s[MAX_N + 4];
int ps[26], qs[26];
bool used[26];
int main() {
  int n;
  scanf("%d", &n);
  memset(ps, -1, sizeof(ps));
  memset(qs, -1, sizeof(qs));
  for (int i = 0; i < n; i++) {
    scanf("%s", s);
    used[s[0] - 'a'] = true;
    for (int j = 1; s[j]; j++) {
      int c0 = s[j - 1] - 'a', c1 = s[j] - 'a';
      used[c1] = true;
      if ((qs[c0] >= 0 && qs[c0] != c1) || (ps[c1] >= 0 && ps[c1] != c0)) {
        puts("NO");
        return 0;
      }
      qs[c0] = c1, ps[c1] = c0;
    }
  }
  int l = 0;
  for (int i = 0; i < 26; i++)
    if (used[i]) l++;
  int k = 0;
  for (int st = 0; st < 26; st++)
    if (used[st] && ps[st] < 0) {
      for (int u = st; u >= 0; u = qs[u]) s[k++] = 'a' + u;
    }
  s[k] = '\0';
  if (k == l)
    puts(s);
  else
    puts("NO");
  return 0;
}
