#include <bits/stdc++.h>
#pragma GCC optimize(2)
#pragma GCC optimize(3)
#pragma GCC optimize(4)
using namespace std;
const int N = 1e5 + 5;
char s[N];
int pre[26], nxt[26], n;
bool vis[26], vv[26];
int main() {
  memset(pre, -1, sizeof(pre)), memset(nxt, -1, sizeof(nxt));
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    scanf("%s", s);
    int l = strlen(s);
    for (int j = 0; j + 1 < l; ++j) {
      int x = s[j] - 'a', y = s[j + 1] - 'a';
      if (nxt[x] != -1 && nxt[x] != y) return 0, puts("NO");
      if (pre[y] != -1 && pre[y] != x) return 0, puts("NO");
      vis[x] = vis[y] = true;
      nxt[x] = y;
      pre[y] = x;
    }
  }
  for (int i = 0; i < 26; ++i) {
    if (vis[i] && pre[i] == -1) {
      int x = i;
      while (true) {
        vv[x] = true;
        x = nxt[x];
        if (x == -1) break;
      }
    }
  }
  for (int i = 0; i < 26; ++i)
    if (vis[i] && !vv[i]) return 0, puts("NO");
  for (int i = 0; i < 26; ++i) {
    if (vis[i] && pre[i] == -1) {
      int x = i;
      while (true) {
        putchar('a' + x);
        x = nxt[x];
        if (x == -1) break;
      }
    }
  }
  return 0;
}
