#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 100;
string s;
int p[30], root[30];
bool used[30];
void dfs(int v) {
  s += v + 'a';
  if (p[v] == v) {
    return;
  }
  if (used[v]) {
    puts("NO"), 0;
  }
  used[v] = 1;
  dfs(p[v]);
}
int main() {
  for (int i = 0; i < 30; i++) {
    p[i] = i;
    root[i] = 1;
    used[i] = 1;
  }
  int n;
  scanf("%d\n", &n);
  for (int i = 1; i <= n; i++) {
    char s[N];
    scanf("%s", s);
    for (int j = 0; j < strlen(s); j++) {
      used[s[j] - 'a'] = 0;
    }
    for (int j = 1; j < strlen(s); j++) {
      if (p[s[j - 1] - 'a'] != s[j - 1] - 'a' &&
          p[s[j - 1] - 'a'] != s[j] - 'a') {
        return puts("NO"), 0;
      }
      if (p[s[j - 1] - 'a'] == s[j - 1] - 'a') {
        p[s[j - 1] - 'a'] = s[j] - 'a';
        root[s[j] - 'a'] = 0;
      }
    }
  }
  vector<string> ans;
  for (int i = 0; i < 26; i++) {
    if (root[i] && !used[i]) {
      dfs(i);
      ans.push_back(s);
      s.clear();
    }
  }
  if (ans.empty()) {
    return puts("NO"), 0;
  }
  sort(ans.begin(), ans.end());
  for (int i = 0; i < ans.size(); i++) {
    printf("%s", ans[i].c_str());
  }
}
