#include <bits/stdc++.h>
using namespace std;
vector<string> a;
vector<vector<long long>> alph;
vector<long long> nextt(26, 27);
vector<long long> anc(26, 27);
string ans = "";
long long leng = 0;
vector<bool> h(28, false);
vector<bool> alpha(26, false);
bool rec(long long i) {
  if (long long(ans.size()) > leng) return false;
  if (i >= 26) return false;
  if (anc[i] == 27 && !h[i] && alpha[i]) {
    ans.push_back(i + 'a');
    h[i] = true;
    while (nextt[i] != 27 && !h[nextt[i]]) {
      i = nextt[i];
      h[i] = true;
      ans.push_back(i + 'a');
    }
    if (long long(ans.size()) == leng) {
      cout << ans << endl;
      return true;
    }
  }
  return rec(i + 1);
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  alph.resize(n);
  a.resize(n);
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    vector<long long> alp(26, 0);
    for (long long j = 0; j < long long(a[i].size()); j++) {
      alpha[a[i][j] - 'a'] = true;
      if (alp[a[i][j] - 'a'] != 0) {
        cout << "NO" << endl;
        return 0;
      }
      alp[a[i][j] - 'a'] = j;
    }
  }
  for (long long i = 0; i < 26; i++) leng += alpha[i];
  for (long long i = 0; i < n; i++) {
    if (long long(a[i].size()) > 1) {
      if (nextt[a[i][0] - 'a'] == 27) {
        nextt[a[i][0] - 'a'] = a[i][1] - 'a';
      } else {
        if (nextt[a[i][0] - 'a'] != (a[i][1] - 'a')) {
          cout << "NO" << endl;
          return 0;
        }
      }
    }
    for (long long j = 1; j < long long(a[i].size()) - 1; j++) {
      if (nextt[a[i][j] - 'a'] == 27) {
        nextt[a[i][j] - 'a'] = a[i][j + 1] - 'a';
      } else {
        if (nextt[a[i][j] - 'a'] != (a[i][j + 1] - 'a')) {
          cout << "NO" << endl;
          return 0;
        }
      }
      if (anc[a[i][j] - 'a'] == 27) {
        anc[a[i][j] - 'a'] = a[i][j - 1] - 'a';
      } else {
        if (anc[a[i][j] - 'a'] != (a[i][j - 1] - 'a')) {
          cout << "NO" << endl;
        }
      }
    }
    long long j = long long(a[i].size()) - 1;
    if (j != 0) {
      if (anc[a[i][j] - 'a'] == 27) {
        anc[a[i][j] - 'a'] = a[i][j - 1] - 'a';
      } else {
        if (anc[a[i][j] - 'a'] != (a[i][j - 1] - 'a')) {
          cout << "NO" << endl;
        }
      }
    }
  }
  string ans = "";
  for (long long i = 0; i < 26; i++) {
    ans = "";
    fill((h.begin()), (h.end()), false);
    if (rec(i)) return 0;
  }
  cout << "NO" << endl;
  return 0;
}
