#include <bits/stdc++.h>
using namespace std;
int nex[100], vis[100], ok[100], fib[100], cnt = 0, pre[100];
char s[100010], ans[100];
void print(int x) {
  if (ok[x]) return;
  ok[x] = 1;
  ans[++cnt] = 'a' + x;
  if (nex[x] != -1) print(nex[x]);
}
int main() {
  int n;
  cin >> n;
  memset(nex, -1, sizeof(nex));
  memset(pre, -1, sizeof(pre));
  for (int i = 1; i <= n; i++) {
    scanf("%s", s);
    int len = strlen(s);
    for (int j = 0; j < len - 1; j++) {
      int a = s[j] - 'a', b = s[j + 1] - 'a';
      fib[b] = 1;
      if (nex[a] != -1) {
        if (nex[a] != b) {
          puts("NO");
          return 0;
        }
      } else
        nex[a] = b;
      if (pre[b] != -1) {
        if (pre[b] != a) {
          puts("NO");
          return 0;
        }
      } else
        pre[b] = a;
    }
    for (int j = 0; j < len; j++) vis[s[j] - 'a'] = 1;
  }
  for (int i = 0; i < 26; i++)
    if (!fib[i] && vis[i]) {
      print(i);
    }
  int tot = 0;
  for (int i = 0; i < 26; i++)
    if (vis[i]) tot++;
  if (cnt < tot)
    puts("NO");
  else
    cout << ans + 1 << endl;
  return 0;
}
