#include <bits/stdc++.h>
using namespace std;
int n, nxt[26], prv[26], v[26], vv[26];
vector<string> ans;
void kill() {
  cout << "NO";
  exit(0);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  memset(nxt, -1, sizeof nxt);
  memset(prv, -1, sizeof prv);
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    bool vis[26] = {};
    for (auto x : s) {
      if (vis[x - 'a']) kill();
      vis[x - 'a'] = v[x - 'a'] = 1;
    }
    for (int j = 0; j + 1 < s.size(); j++) {
      int x = s[j] - 'a', z = s[j + 1] - 'a';
      if (nxt[x] != -1 && nxt[x] != z) kill();
      if (prv[z] != -1 && prv[z] != x) kill();
      nxt[x] = z;
      prv[z] = x;
    }
  }
  for (int i = 0; i < 26; i++) {
    if (prv[i] == -1 && v[i]) {
      string x;
      for (int j = i; j != -1; j = nxt[j]) {
        vv[j] = 1;
        x += char(j + 'a');
      }
      ans.push_back(x);
    }
  }
  for (int i = 0; i < 26; i++)
    if (v[i] && !vv[i]) kill();
  sort(ans.begin(), ans.end());
  for (auto i : ans) cout << i;
}
