#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<string> s(n);
  for (int i = 0; i < n; ++i) cin >> s[i];
  vector<int> use(26);
  for (int i = 0; i < n; ++i) {
    int cnt[26] = {};
    for (char c : s[i]) {
      cnt[c - 'a']++;
      use[c - 'a'] = 1;
    }
    for (int j = 0; j < 26; ++j) {
      if (cnt[j] >= 2) {
        cout << "NO" << endl;
        return 0;
      }
    }
  }
  vector<int> next(26, -1), past(26, -1);
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < s[i].length() - 1; ++j) {
      next[s[i][j] - 'a'] = s[i][j + 1] - 'a';
      past[s[i][j + 1] - 'a'] = s[i][j] - 'a';
    }
  }
  vector<string> cand;
  for (int i = 0; i < 26; ++i) {
    if (!use[i] || past[i] != -1) continue;
    string tmp;
    int x = i;
    while (x != -1) {
      if (next[x] != -1 && past[next[x]] != x) {
        cout << "NO" << endl;
        return 0;
      }
      tmp += ('a' + x);
      x = next[x];
    }
    cand.push_back(tmp);
  }
  sort((cand).begin(), (cand).end());
  string ans;
  for (string str : cand) ans += str;
  for (int i = 0; i < n; ++i) {
    if (ans.find(s[i]) == string::npos) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << ans << endl;
  return 0;
}
