#include <bits/stdc++.h>
using ll = long long;
using ld = long double;
using namespace std;
const int MAXN = 200001;
bool w[26];
int nxt[26];
int pvc[26];
void nein() {
  cout << "NO\n";
  exit(0);
}
int main() {
  ios_base::sync_with_stdio(false);
  cout.setf(ios::fixed);
  cout.precision(20);
  cout.tie(nullptr);
  cin.tie(nullptr);
  int n;
  cin >> n;
  fill(begin(nxt), end(nxt), -1);
  for (int i = 0; i < n; ++i) {
    string s;
    cin >> s;
    for (char c : s) {
      w[c - 'a'] = true;
    }
    for (int j = 1; j < s.length(); ++j) {
      int pv = s[j - 1] - 'a', nx = s[j] - 'a';
      if (nxt[pv] == nx) {
        continue;
      }
      ++pvc[nx];
      if (nxt[pv] == -1) {
        nxt[pv] = nx;
        continue;
      }
      nxt[pv] = nx;
    }
  }
  int forcenext = -1;
  string ans;
  for (;;) {
    if (forcenext != -1 && (!w[forcenext] || pvc[forcenext])) {
      nein();
    }
    bool hw = false;
    for (int j = 0; j < 26; ++j) {
      hw |= w[j];
    }
    if (!hw) {
      break;
    }
    int bj;
    if (forcenext != -1) {
      bj = forcenext;
    } else {
      bj = -1;
      for (int j = 25; j >= 0; --j) {
        if (pvc[j] == 0 && w[j]) {
          bj = j;
        }
      }
    }
    if (bj == -1) {
      nein();
    }
    ans += char('a' + bj);
    w[bj] = false;
    forcenext = nxt[bj];
    if (forcenext != -1) {
      --pvc[forcenext];
    }
  }
  cout << ans << "\n";
}
