#include <bits/stdc++.h>
using namespace std;
int l[250];
int r[250];
int was[250];
stringstream ss;
void dfs(char c) {
  if (!c) return;
  if (was[c]) return;
  was[c] = 1;
  ss << c;
  dfs(r[c]);
}
int main() {
  set<char> ks;
  int n;
  cin >> n;
  for (int t = 0; t < n; ++t) {
    string k;
    cin >> k;
    memset(was, 0, sizeof was);
    for (int i = 0; i < k.size(); ++i) {
      ks.insert(k[i]);
      if (was[k[i]]) {
        cout << "NO" << endl;
        return 0;
      }
      was[k[i]] = 1;
      if (i + 1 == k.size()) continue;
      if (r[k[i]] != 0 && r[k[i]] != k[i + 1]) {
        cout << "NO" << endl;
        return 0;
      }
      if (l[k[i + 1]] != 0 && l[k[i + 1]] != k[i]) {
        cout << "NO" << endl;
        return 0;
      }
      r[k[i]] = k[i + 1];
      l[k[i + 1]] = k[i];
    }
  }
  memset(was, 0, sizeof was);
  for (auto i : ks) {
    if (l[i] == 0) dfs(i);
  }
  string resa;
  ss >> resa;
  if (resa.size() != ks.size()) {
    cout << "NO" << endl;
    return 0;
  }
  cout << resa << endl;
  return 0;
}
