#include <bits/stdc++.h>
using namespace std;
void die() {
  cout << "NO";
  exit(0);
}
vector<long long> nxt(26, -1);
vector<long long> used(26, 0);
vector<vector<long long> > g(26);
long long cti(char a) { return a - 'a'; }
char itc(long long a) { return (char)(a + 97); }
void add(string &a) {
  for (long long i = 0; i < a.size(); ++i) used[cti(a[i])] = 1;
  for (long long i = 0; i < a.size() - 1; ++i) {
    if (a[i] == a[i + 1]) die();
    if (nxt[cti(a[i])] == -1) nxt[cti(a[i])] = cti(a[i + 1]);
    if (nxt[cti(a[i])] != cti(a[i + 1])) {
      die();
    }
  }
}
string st = "";
void dfs(long long a, vector<long long> &curused, long long p = -1) {
  curused[a] = 1;
  st += itc(a);
  for (long long i = 0; i < g[a].size(); ++i) {
    long long b = g[a][i];
    if (b == p) continue;
    if (curused[b]) die();
    dfs(b, curused, a);
  }
}
signed main() {
  long long n;
  cin >> n;
  for (long long i = 0; i < n; ++i) {
    string s;
    cin >> s;
    for (long long j = 0; j < s.size(); ++j) {
      add(s);
    }
  }
  for (long long i = 0; i < 26; ++i) {
    if (nxt[i] != -1) {
      g[i].push_back(nxt[i]);
      g[nxt[i]].push_back(i);
    }
  }
  vector<string> ans;
  vector<long long> c(26, 0);
  bool was = false;
  for (long long i = 0; i < 26; ++i) {
    if (used[i] && nxt[i] == -1) {
      was = true;
      st = "";
      dfs(i, c);
      reverse(st.begin(), st.end());
      ans.push_back(st);
    }
  }
  if (!was) die();
  sort(ans.begin(), ans.end());
  for (long long i = 0; i < ans.size(); ++i) {
    cout << ans[i];
  }
}
