#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 7;
const int inf = INT_MAX;
const long long inff = 1e18;
const long long mod = 1e9 + 7;
set<int> G[38], RG[38];
int have[38];
int n;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  string t;
  for (int i = 1; i <= n; i++) {
    string s;
    cin >> s;
    t += s;
    int N = s.length();
    for (char c : s) have[c - 'a'] = 1;
    for (int j = 0; j < N - 1; j++) {
      G[s[j] - 'a'].insert(s[j + 1] - 'a');
      if (((int)(G[s[j] - 'a']).size()) >= 2) return cout << "NO" << endl, 0;
      RG[s[j + 1] - 'a'].insert(s[j] - 'a');
      if (((int)(RG[s[j + 1] - 'a']).size()) >= 2)
        return cout << "NO" << endl, 0;
    }
  }
  priority_queue<int, vector<int>, greater<int> > pq;
  for (int i = 0; i < 26; i++) {
    if (((int)(RG[i]).size()) == 0 && have[i]) pq.push(i);
  }
  string ans;
  while (!pq.empty()) {
    int now = pq.top();
    pq.pop();
    while (1) {
      ans += (char)(now + 'a');
      if (((int)(G[now]).size()) == 0) break;
      now = (*(G[now].begin()));
      if (ans.length() > 1000) return cout << "NO" << endl, 0;
    }
  }
  set<int> sss;
  for (char c : t) sss.insert(c);
  if (ans.length() != sss.size())
    cout << "NO" << endl;
  else
    cout << ans << endl;
}
