#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long expo_pow(long long x, long long y) {
  y = y % (mod - 1);
  if (y == 0) y = mod - 1;
  long long res = 1;
  while (y) {
    if (y & 1) res = (res * x) % mod;
    x = (x * x) % mod;
    y >>= 1;
  }
  return res;
}
signed main() {
  long long n;
  cin >> n;
  vector<long long> adj[26];
  long long visited[26] = {0};
  vector<string> q(n);
  set<long long> x;
  for (long long i = 0; i < n; i++) cin >> q[i];
  for (auto u : q) {
    long long tmp = u.size();
    if (visited[u[0] - 'a'] == 1) {
      long long fl = 0;
      for (long long i = 1; i < u.size(); i++) {
        if (fl == 0 and adj[u[i - 1] - 'a'].size() > 0 and
            adj[u[i - 1] - 'a'][0] == u[i] - 'a')
          continue;
        else if (adj[u[i - 1] - 'a'].size() > 0 || visited[u[i] - 'a'] == 1) {
          cout << "NO\n";
          return 0;
        } else {
          adj[u[i - 1] - 'a'].push_back(u[i] - 'a');
          visited[u[i] - 'a'] = 1;
          fl = 1;
        }
      }
    } else {
      visited[u[0] - 'a'] = 1;
      x.insert(u[0] - 'a');
      for (long long i = 1; i < u.size(); i++) {
        if (visited[u[i] - 'a'] == 1) {
          cout << "NO\n";
          return 0;
        }
        visited[u[i] - 'a'] = 1;
        adj[u[i - 1] - 'a'].push_back(u[i] - 'a');
        if (adj[u[i - 1] - 'a'].size() > 1) {
          cout << "NO\n";
          return 0;
        }
      }
    }
  }
  vector<char> ans;
  long long cur = 0;
  for (auto u : x) {
    cur = u;
    while (!adj[cur].empty()) {
      ans.push_back(char(cur + 'a'));
      cur = adj[cur][0];
    }
    ans.push_back(char(cur + 'a'));
  }
  for (auto u : ans) {
    cout << u;
  }
  cout << "\n";
}
