#include <bits/stdc++.h>
using namespace std;
void solve() {
  vector<int> next(26, -1);
  vector<int> prev(26, -1);
  vector<bool> isThere(26);
  int n;
  cin >> n;
  for (int _ = 0; _ < n; _++) {
    string s;
    cin >> s;
    set<char> v((s).begin(), (s).end());
    if ((int)v.size() != (int)s.size()) {
      cout << "NO";
      return;
    }
    for (auto i : v) isThere[i - 'a'] = 1;
    for (int i = 1; i < (int)s.size(); i++) {
      if (next[s[i - 1] - 'a'] == -1 and prev[s[i] - 'a'] == -1)
        next[s[i - 1] - 'a'] = s[i] - 'a', prev[s[i] - 'a'] = s[i - 1] - 'a';
      else if (next[s[i - 1] - 'a'] == -1) {
        if (prev[s[i] - 'a'] != s[i - 1] - 'a') {
          cout << "NO";
          return;
        }
        next[s[i - 1] - 'a'] = s[i] - 'a';
      } else if (prev[s[i] - 'a'] == -1) {
        if (next[s[i - 1] - 'a'] != s[i] - 'a') {
          cout << "NO";
          return;
        }
        prev[s[i] - 'a'] = s[i - 1] - 'a';
      } else {
        if (prev[s[i] - 'a'] != s[i - 1] - 'a') {
          cout << "NO";
          return;
        }
        if (next[s[i - 1] - 'a'] != s[i] - 'a') {
          cout << "NO";
          return;
        }
      }
    }
  }
  string s;
  for (int i = 0; i < 26; i++) {
    if (isThere[i] and prev[i] == -1) {
      int cur = i;
      while (cur != -1) {
        s.push_back(char(cur + 'a'));
        isThere[cur] = 0;
        cur = next[cur];
      }
    }
  }
  if (any_of((isThere).begin(), (isThere).end(), [](bool x) { return x; })) {
    cout << "NO";
    return;
  }
  cout << s;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
