#include <bits/stdc++.h>
using namespace std;
const int MAXN = 26 + 10;
set<int> ne[MAXN];
bool must[MAXN], mark[MAXN];
vector<int> ve;
string s;
int n, dig[MAXN];
int main() {
  ios::sync_with_stdio(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> s;
    set<char> uni;
    for (auto j : s) {
      uni.insert(j);
      must[j - 'a'] = true;
    }
    if (uni.size() != s.size()) {
      return cout << "NO" << endl, 0;
    }
    for (int j = 1; j < s.size(); j++) {
      dig[s[j] - 'a']++;
      ne[s[j - 1] - 'a'].insert(s[j] - 'a');
    }
  }
  for (int i = 0; i < 26; i++) {
    if (ne[i].size() > 1) return cout << "NO" << endl, 0;
    if (!dig[i] && must[i]) ve.push_back(i);
  }
  s = "";
  for (auto i : ve) {
    int me = i;
    while (~me) {
      if (mark[me]) {
        return cout << "NO" << endl, 0;
      }
      mark[me] = true;
      s += me + 'a';
      if (ne[me].size())
        me = *ne[me].begin();
      else
        me = -1;
    }
  }
  for (int i = 0; i < 26; i++) {
    if (must[i] && !mark[i]) return cout << "NO" << endl, 0;
  }
  cout << s << endl;
  return 0;
}
