#include <bits/stdc++.h>
using namespace std;
int nxt[26], prv[26], saw[26], nec[26], used[26];
int n;
void solve() {
  cin >> n;
  for (int i = 0; i < 26; ++i) {
    nxt[i] = prv[i] = -1;
  }
  for (int i = 1; i <= n; ++i) {
    string s;
    cin >> s;
    for (int c = 0; c < 26; ++c) {
      saw[c] = 0;
    }
    for (char c : s) {
      if (saw[c - 'a']) {
        cout << "NO\n";
        return;
      }
      nec[c - 'a'] = 1;
      saw[c - 'a'] = 1;
    }
    for (int j = 0; j + 1 < s.size(); ++j) {
      int a = s[j] - 'a';
      int b = s[j + 1] - 'a';
      if (nxt[a] != -1 && nxt[a] != b) {
        cout << "NO\n";
        return;
      }
      nxt[a] = b;
      if (prv[b] != -1 && prv[b] != a) {
        cout << "NO\n";
        return;
      }
      prv[b] = a;
    }
  }
  string ans;
  for (int i = 0; i < 26; ++i) {
    if (!nec[i]) {
      continue;
    }
    if (prv[i] == -1) {
      for (int v = i; v != -1; v = nxt[v]) {
        if (used[v]) {
          cout << "NO\n";
          return;
        }
        used[v] = 1;
        ans.push_back(v + 'a');
      }
    }
  }
  for (int i = 0; i < 26; ++i) {
    if (nec[i] && !used[i]) {
      cout << "NO\n";
      return;
    }
  }
  cout << ans << '\n';
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int tt = 1;
  while (tt--) {
    solve();
  }
  return 0;
}
