#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> next(26, -1), prev(26, -1);
  vector<bool> a(26, false);
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    for (char c : s) {
      a[c - 'a'] = true;
    }
    for (int j = 0; j < s.size() - 1; j++) {
      if (next[s[j] - 'a'] != -1 && next[s[j] - 'a'] != s[j + 1] - 'a') {
        cout << "NO" << endl;
        return 0;
      }
      next[s[j] - 'a'] = s[j + 1] - 'a';
      if (prev[s[j + 1] - 'a'] != -1 && prev[s[j + 1] - 'a'] != s[j] - 'a') {
        cout << "NO" << endl;
        return 0;
      }
      prev[s[j + 1] - 'a'] = s[j] - 'a';
    }
  }
  string ans;
  vector<bool> used(26, false);
  for (int i = 0; i < 26; i++) {
    if (!a[i] || prev[i] != -1) continue;
    int cur = i;
    do {
      if (used[cur]) {
        cout << "NO" << endl;
        return 0;
      }
      used[cur] = true;
      ans += (char)('a' + cur);
      cur = next[cur];
    } while (cur != -1);
  }
  for (int i = 0; i < 26; i++) {
    if (a[i] && !used[i]) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << ans << endl;
  return 0;
}
