#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  vector<int> nxt(26, -1), prev(26, -1), vis(26);
  string s;
  bool valid = true;
  for (int i = 0; i < n; i++) {
    cin >> s;
    vis[s[0] - 'a'] = true;
    for (int j = 0; j < s.size() - 1 && valid; j++) {
      if (nxt[s[j] - 'a'] != -1 && nxt[s[j] - 'a'] != s[j + 1] - 'a')
        valid = false;
      if (prev[s[j + 1] - 'a'] != -1 && prev[s[j + 1] - 'a'] != s[j] - 'a')
        valid = false;
      vis[s[j + 1] - 'a'] = vis[s[j] - 'a'] = true;
      nxt[s[j] - 'a'] = s[j + 1] - 'a';
      prev[s[j + 1] - 'a'] = s[j] - 'a';
    }
  }
  vector<int> val;
  for (int i = 0; i < 26; i++)
    if (prev[i] == -1 && vis[i]) {
      vector<int> temp(26);
      int curr = i;
      while (curr != -1 && !temp[curr]) {
        temp[curr] = true;
        curr = nxt[curr];
      }
      if (curr != -1) valid = false;
      val.push_back(i);
    }
  if (!valid || val.empty()) {
    cout << "NO" << endl;
    return 0;
  }
  sort(val.begin(), val.end());
  for (auto u : val) {
    int curr = u;
    while (curr != -1) {
      cout << char(curr + 'a');
      curr = nxt[curr];
    }
  }
  cout << endl;
}
