#include <bits/stdc++.h>
using namespace std;
bool mat[30][30];
char res[100];
char s[100005];
bool ideg[30];
bool use[30];
bool vis[30];
int len;
void dfs(int u) {
  vis[u] = true;
  res[len++] = u + 'a';
  for (int i = 0; i < 26; i++)
    if (mat[u][i]) {
      if (!vis[i])
        dfs(i);
      else {
        puts("NO");
        exit(0);
      }
    }
}
int main() {
  int n;
  scanf("%d", &n);
  while (n--) {
    scanf("%s", s);
    use[s[0] - 'a'] = true;
    for (int i = 1; s[i]; i++) {
      mat[s[i - 1] - 'a'][s[i] - 'a'] = true;
      ideg[s[i] - 'a'] = true;
      use[s[i] - 'a'] = true;
    }
  }
  for (int i = 0; i < 26; i++)
    if (!ideg[i] && use[i]) dfs(i);
  for (int i = 0; i < 26; i++)
    if (ideg[i] && !vis[i]) return puts("NO"), 0;
  puts(len ? res : "NO");
  return 0;
}
