#include <bits/stdc++.h>
using namespace std;
int us[100], m[100], ous[100], om[100], pos[100], used[100];
bool cmp(string a, string b) { return a < b; }
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  bool k = 0;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    for (int j = 0; j < s.size(); j++) {
      int g1 = s[j] - 'a' + 1;
      used[g1] = 1;
    }
    for (int j = 0; j < s.size() - 1; j++) {
      int g1 = s[j] - 'a' + 1, g2 = s[j + 1] - 'a' + 1;
      if (us[g1] && m[g1] != g2) {
        k = 1;
      }
      if (ous[g2] && om[g2] != g1) {
        k = 1;
      }
      us[g1] = 1;
      m[g1] = g2;
      ous[g2] = 1;
      om[g2] = g1;
    }
  }
  if (k) {
    cout << "NO";
    return 0;
  }
  vector<string> v;
  for (int i = 0; i < 26; i++) {
    string ans = "";
    char t = i + 1;
    if (pos[t]) continue;
    while (ous[t]) {
      if (pos[t]) {
        cout << "NO";
        return 0;
      }
      pos[t] = 1;
      t = om[t];
    }
    while (us[t]) {
      pos[t] = 1;
      char t2 = t - 1 + 'a';
      ans += t2;
      t = m[t];
    }
    if (used[t]) {
      pos[t] = 1;
      char t2 = t - 1 + 'a';
      ans += t2;
    }
    if (!ans.empty()) {
      v.push_back(ans);
    }
  }
  sort(v.begin(), v.end(), cmp);
  for (int i = 0; i < v.size(); i++) {
    cout << v[i];
  }
}
