#include <bits/stdc++.h>
using namespace std;
long long n, i, j, f1, f[256], stn;
char p[256];
pair<long long, pair<char, char> > h[256];
string s, ss[256], st[256];
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (i = 0; i <= 255; i++)
    h[i].second.first = h[i].second.second = p[i] = '!';
  for (i = 1; i <= n; i++) {
    cin >> s;
    if (h[s[0]].first == 0) h[s[0]].first = 1;
    for (j = 1; j < s.size(); j++) {
      if (h[s[j - 1]].first == 1 && h[s[j - 1]].second.second != s[j] &&
          h[s[j - 1]].second.second != '!') {
        cout << "NO"
             << "\n";
        return 0;
      }
      if (h[s[j]].first == 1 &&
          (h[s[j]].second.first != s[j - 1] && h[s[j]].second.first != '!')) {
        cout << "NO"
             << "\n";
        return 0;
      }
      if (h[s[j]].first == 1 &&
          (h[s[j]].second.first == '!' && h[s[j]].second.second == s[j - 1])) {
        cout << "NO"
             << "\n";
        return 0;
      }
      h[s[j - 1]].second.second = s[j];
      h[s[j]].first = 1;
      h[s[j]].second.first = s[j - 1];
    }
  }
  for (char hh = 'a'; hh <= 'z'; hh++)
    if (h[hh].first && !f[hh]) {
      s = "";
      f1 = 0;
      char x = hh;
      while (x != '!') {
        if (f[x]) {
          f1 = 1;
          if (p[x] == '!') {
            ss[x] = s + ss[x];
            p[s[0]] = x;
          } else {
            ss[p[x]] = s + ss[p[x]];
            p[s[0]] = x;
          }
          break;
        }
        s += x;
        f[x] = 1;
        x = h[x].second.second;
      }
      if (!f1) ss[hh] = s;
    }
  for (char x = 'a'; x <= 'z'; x++)
    if (ss[x] != "") st[++stn] = ss[x];
  sort(st + 1, st + 1 + stn);
  for (i = 1; i <= stn; i++) cout << st[i];
  cout << "\n";
  return 0;
}
