#include <bits/stdc++.h>
using namespace std;
int nex[30], pre[30];
char ans[30];
const int maxn = 1e5 + 5;
int main() {
  int n, tol = 0;
  char a[maxn];
  bool can = true;
  memset(nex, -1, sizeof nex);
  memset(pre, -1, sizeof pre);
  scanf("%d", &n);
  getchar();
  for (int i = 0; i < n; i++) {
    scanf("%s", a);
    int lena = strlen(a);
    if (pre[a[0] - 'a'] == -1) pre[a[0] - 'a'] = -2;
    for (int i = 1; i < lena; i++) {
      if ((nex[a[i - 1] - 'a'] == -1 || nex[a[i - 1] - 'a'] == a[i] - 'a') &&
          (pre[a[i] - 'a'] == -1 || pre[a[i] - 'a'] == -2 ||
           pre[a[i] - 'a'] == a[i - 1] - 'a')) {
        nex[a[i - 1] - 'a'] = a[i] - 'a';
        pre[a[i] - 'a'] = a[i - 1] - 'a';
      } else {
        can = false;
      }
    }
  }
  for (int i = 0; i < 26; i++) {
    if (pre[i] == -2) {
      for (int k = i; k != -1;) {
        ans[tol++] = k + 'a';
        k = nex[k];
      }
    }
  }
  a[tol++] = '\0';
  for (int i = 0; i < 26; i++) {
    for (int k = nex[i]; k != -1;) {
      if (k == i) {
        can = false;
        break;
      }
      k = nex[k];
    }
  }
  if (!can)
    printf("NO\n");
  else
    printf("%s\n", ans);
}
