#include <bits/stdc++.h>
using namespace std;
template <typename X, typename Y>
static inline void xmin(X &x, Y y) {
  if (y < x) x = y;
}
template <typename X, typename Y>
static inline void xmax(X &x, Y y) {
  if (x < y) x = y;
}
long long pw(long long x, long long y, long long md) {
  if (!y) return 1;
  if (y & 1) return (x * pw(x, y - 1, md)) % md;
  long long tmp = pw(x, y / 2, md);
  return (tmp * tmp) % md;
}
int n, vis[26], first[26], B[26], freq[26], occ[26];
vector<string> V;
string s;
bool help(int i) {
  int j = B[i], c1 = 0, c2 = 0;
  s.clear();
  while (j != -1 && c1 < 100) {
    s = (char)(j + 'a') + s;
    vis[j] = 1;
    j = B[j];
    ++c1;
  }
  while (i != -1 && c2 < 100) {
    s = s + (char)(i + 'a');
    vis[i] = 1;
    i = first[i];
    ++c2;
  }
  if (c1 == 100 || c2 == 100) return 0;
  return 1;
}
void solve() {
  memset(first, -1, sizeof(first));
  memset(B, -1, sizeof(B));
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> s;
    memset(freq, 0, sizeof(freq));
    for (int j = 0; j < (long long)s.size(); ++j) {
      ++freq[s[j] - 'a'];
      ++occ[s[j] - 'a'];
      if (freq[s[j] - 'a'] > 1) {
        cout << "NO";
        return;
      }
      if (j + 1 < (long long)s.size()) {
        if (first[s[j] - 'a'] != -1 && first[s[j] - 'a'] != s[j + 1] - 'a') {
          cout << "NO";
          return;
        }
        first[s[j] - 'a'] = s[j + 1] - 'a';
      }
      if (j > 0) {
        if (B[s[j] - 'a'] != -1 && B[s[j] - 'a'] != s[j - 1] - 'a') {
          cout << "NO";
          return;
        }
        B[s[j] - 'a'] = s[j - 1] - 'a';
      }
    }
  }
  for (int i = 0; i < 26; ++i)
    if ((B[i] != -1 && first[B[i]] != i) ||
        (first[i] != -1 && B[first[i]] != i)) {
      cout << "NO";
      return;
    }
  for (int i = 0; i < 26; ++i) {
    if (occ[i] && !vis[i]) {
      if (!help(i)) {
        cout << "NO";
        return;
      }
      V.push_back(s);
    }
  }
  sort(V.begin(), V.end());
  for (auto i : V) cout << i;
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int TESTS = 1;
  while (TESTS--) solve();
  return 0;
}
