#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100000 + 10;
string str[MAXN];
int isv[400];
set<string> se;
bool isok(string s) {
  if (s.size() > 26) return false;
  int alp[26];
  memset(alp, 0x00, sizeof(alp));
  for (int i = 0; i < s.size(); ++i) {
    if (alp[s[i] - 'a']) return false;
    alp[s[i] - 'a'] = 1;
  }
  return true;
}
int solve(string s1, string s2) {
  if (s1.find(s2) != std::string::npos) return 1;
  if (s2.find(s1) != std::string::npos) return 2;
  set<char> ch;
  for (int i = 0; i < s1.size(); ++i) ch.insert(s1[i]);
  for (int i = 0; i < s2.size(); ++i) ch.insert(s2[i]);
  int len = s1.size() + s2.size() - ch.size();
  if (!len) return 3;
  int i1, i2;
  string sss;
  i1 = s1.size() - len;
  i2 = 0;
  sss = s1.substr(0, s1.size() - len);
  while (i1 < s1.size() && s1[i1] == s2[i2]) ++i1, ++i2;
  if (i1 == s1.size()) {
    se.insert(sss + s2);
    return 4;
  }
  i1 = 0;
  i2 = s2.size() - len;
  sss = s2.substr(0, s2.size() - len);
  while (i2 < s2.size() && s1[i1] == s2[i2]) ++i1, ++i2;
  if (i2 == s2.size()) {
    se.insert(sss + s1);
    return 4;
  }
  return 5;
}
int main(void) {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  if (n > 27 * 13) {
    cout << "NO";
    return 0;
  }
  for (int i = 1; i <= n; ++i) {
    cin >> str[i];
    if (!isok(str[i])) {
      cout << "NO";
      return 0;
    }
  }
  int top = n;
  while (true) {
    memset(isv, 0x00, sizeof(isv));
    for (int i = 1; i <= top; ++i) {
      if (isv[i]) continue;
      for (int j = i + 1; j <= top; ++j) {
        if (isv[j]) continue;
        int c = solve(str[i], str[j]);
        if (c == 1)
          isv[j] = 1;
        else if (c == 2)
          isv[i] = 1;
        else if (c == 4)
          isv[i] = isv[j] = 1;
        else if (c == 5) {
          cout << "NO";
          return 0;
        }
        if (isv[i] == 1) break;
      }
    }
    if (se.empty()) break;
    int to = 0;
    for (int i = 1; i <= top; ++i) {
      if (!isv[i]) str[++to] = str[i];
    }
    set<string>::iterator it;
    for (it = se.begin(); it != se.end(); ++it) str[++to] = *it;
    se.clear();
    top = to;
  }
  for (int i = 1; i <= top; ++i) {
    if (!isv[i]) se.insert(str[i]);
  }
  set<string>::iterator it;
  for (it = se.begin(); it != se.end(); ++it) cout << (*it);
}
