#include <bits/stdc++.h>
using namespace std;
char ch[100005];
int mp[27][27];
bool f[27];
bool vis[27];
char ans[27];
int main() {
  int n;
  scanf("%d", &n);
  int len;
  int u, v;
  memset(f, 0, sizeof(f));
  while (n--) {
    scanf("%s", ch);
    len = strlen(ch);
    vis[ch[0] - 'a'] = 1;
    for (int i = 1; i < len; i++) {
      u = ch[i - 1] - 'a';
      v = ch[i] - 'a';
      mp[u][v] = 1;
      f[v] = 1;
      vis[v] = 1;
    }
  }
  for (int i = 0; i < 26; i++) {
    int x = 0, y = 0;
    for (int j = 0; j < 26; j++) {
      if (mp[i][j]) x++;
      if (mp[j][i]) y++;
    }
    if (x > 1 || y > 1) {
      puts("NO");
      return 0;
    }
  }
  int cou = 0;
  for (int i = 0; i < 26; i++)
    if (!f[i] && vis[i]) {
      int k = i;
      while (k != -1) {
        ans[cou++] = 'a' + k;
        int t = -1;
        for (int j = 0; j < 26; j++)
          if (mp[k][j]) t = j;
        k = t;
      }
    }
  int tmp = 0;
  for (int i = 0; i < 26; i++)
    if (vis[i]) tmp++;
  if (cou < tmp)
    puts("NO");
  else {
    for (int i = 0; i < cou; i++) putchar(ans[i]);
    puts("");
  }
  return 0;
}
