#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(26, -1);
  vector<int> b(26, -1);
  vector<int> cnt(26);
  for (int i = 0; i < n; i++) {
    vector<bool> kek(26);
    string s;
    cin >> s;
    for (auto &c : s) {
      c -= 'a';
      cnt[c]++;
      if (kek[c]) {
        cout << "NO\n";
        return 0;
      } else {
        kek[c] = true;
      }
    }
    int len = s.size();
    for (int i = 0; i < len - 1; i++) {
      if (a[s[i]] != -1 && a[s[i]] != s[i + 1]) {
        cout << "NO\n" << endl;
        return 0;
      }
      a[s[i]] = s[i + 1];
    }
    for (int i = 1; i < len; i++) {
      if (b[s[i]] != -1 && b[s[i]] != s[i - 1]) {
        cout << "NO\n" << endl;
        return 0;
      }
      b[s[i]] = s[i - 1];
    }
  }
  vector<string> vec;
  bool vis[26];
  memset(vis, false, sizeof(vis));
  for (int i = 0; i < 26; i++) {
    if (cnt[i] && b[i] == -1) {
      string tmp = "";
      for (int j = i; j != -1; j = a[j]) {
        tmp += j + 'a';
        vis[j] = true;
      }
      vec.push_back(tmp);
    }
  }
  for (int i = 0; i < 26; i++) {
    if (cnt[i] && !vis[i]) {
      cout << "NO\n" << endl;
      return 0;
    }
  }
  sort(vec.begin(), vec.end(), [](string a, string b) { return a < b; });
  for (int i = 0; i < vec.size(); i++) {
    cout << vec[i];
  }
  cout << endl;
}
