#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int n, Ans, in[N], out[N], g[26][26], tag[26], vis[26], inq[26];
char s[N], ans[30];
int dfs1(int x) {
  ans[++Ans] = 'a' + x;
  for (int i = 0; i < 26; ++i)
    if (g[x][i]) dfs1(i);
}
int dfs(int x) {
  vis[x] = inq[x] = 1;
  for (int i = 0; i < 26; ++i)
    if (g[x][i]) {
      if (inq[i] || !vis[i] && dfs(i)) return 1;
    }
  return inq[x] = 0;
}
int main() {
  int i, j;
  scanf("%d", &n);
  for (i = 1; i <= n; ++i) {
    scanf("%s", s);
    for (j = 1; s[j]; ++j) {
      int x = s[j - 1] - 'a', y = s[j] - 'a';
      if (g[x][y]) continue;
      g[x][y] = 1;
      ++out[x];
      ++in[y];
    }
    if (j == 1) tag[s[0] - 'a']++;
  }
  for (i = 0; i < 26; ++i)
    if (in[i] > 1 || out[i] > 1 || g[i][i]) return puts("NO"), 0;
  for (i = 0; i < 26; ++i) {
    if (in[i] + tag[i] > 0 && !vis[i] && dfs(i)) return puts("NO"), 0;
  }
  for (i = 0; i < 26; ++i) {
    if (!in[i] && out[i])
      dfs1(i);
    else if (!in[i] && !out[i] && tag[i])
      ans[++Ans] = 'a' + i;
  }
  puts(ans + 1);
  return 0;
}
