#include <bits/stdc++.h>
using namespace std;
const long long N = 100005;
map<char, long long> m;
map<char, char> g;
map<char, long long> vis;
void solve() {
  long long n;
  string s;
  cin >> n;
  long long c = 0;
  set<char> second;
  for (char c = 'a'; c <= 'z'; c = c + 1) {
    second.insert(c);
  }
  while (n--) {
    cin >> s;
    for (long long i = 0; i < s.size(); i++) {
      if (m[s[i]] == 0) {
        m[s[i]] = 1;
        c++;
      }
      if (i > 0) {
        if (g.count(s[i - 1]) and g[s[i - 1]] != s[i]) {
          cout << "NO" << '\n';
          return;
        }
        g[s[i - 1]] = s[i];
        if (second.find(s[i]) != second.end()) second.erase(s[i]);
      }
    }
  }
  priority_queue<char, vector<char>, greater<char> > pq;
  for (char c = 'a'; c <= 'z'; c = c + 1) {
    if (m[c] == 1 and second.find(c) != second.end()) pq.push(c);
  }
  string ans;
  while (!pq.empty()) {
    char cp = pq.top();
    pq.pop();
    while (g.count(cp)) {
      ans.push_back(cp);
      c--;
      cp = g[cp];
      if (vis.count(cp)) {
        cout << "NO" << '\n';
        return;
      }
      vis[cp] = 1;
    }
    ans.push_back(cp);
    c--;
  }
  if (c != 0)
    cout << "NO" << '\n';
  else
    cout << ans << '\n';
}
signed main() {
  long long t;
  ios_base::sync_with_stdio(false);
  t = 1;
  while (t--) solve();
  return 0;
}
