#include <bits/stdc++.h>
using namespace std;
char res[100];
char s[100005];
int nxt[30];
bool use[30];
bool vis[30];
bool ideg[30];
int len;
int main() {
  int n;
  scanf("%d", &n);
  while (n--) {
    scanf("%s", s);
    for (int i = 0; s[i]; i++) {
      if (nxt[s[i] - 'a'] && s[i + 1] && nxt[s[i] - 'a'] != s[i + 1])
        return puts("NO"), 0;
      if (s[i + 1]) nxt[s[i] - 'a'] = s[i + 1];
      use[s[i] - 'a'] = true;
      if (i) ideg[s[i] - 'a'] = true;
    }
  }
  for (int i = 0; i < 26; i++)
    if (!ideg[i] && use[i]) {
      int j = i;
      res[len++] = j + 'a';
      vis[j] = true;
      do {
        j = nxt[j] - 'a';
        res[len++] = j + 'a';
        if (vis[j]) return puts("NO"), 0;
        vis[j] = true;
      } while (nxt[j]);
    }
  for (int i = 0; i < 26; i++)
    if (ideg[i] && !vis[i]) {
      return puts("NO"), 0;
    }
  puts(len ? res : "NO");
  return 0;
}
