#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
const int md = 998244353;
const long long INF = 4e18;
int n;
string s;
int bef[30];
int have[30];
int used[30];
int yes[30];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    cin >> s;
    have[s[0] - 'a'] = 1;
    for (int j = 0; j < 30; j++) used[j] = 0;
    used[s[0] - 'a'] = 1;
    for (int j = 1; j < s.size(); j++) {
      if (!bef[s[j - 1] - 'a']) bef[s[j - 1] - 'a'] = s[j];
      if (s[j] != bef[s[j - 1] - 'a']) return cout << "NO", 0;
      have[s[j] - 'a'] = 1;
      if (used[s[j] - 'a'] == 1) return cout << "NO", 0;
      used[s[j] - 'a'] = 1;
      yes[s[j] - 'a'] = 1;
    }
  }
  for (int i = 0; i < 30; i++) used[i] = 0;
  string k;
  for (int i = 'a'; i <= 'z'; i++) {
    if (have[i - 'a']) {
      if (used[i - 'a']) continue;
      if (yes[i - 'a']) continue;
      k += i;
      used[i - 'a'] = 1;
      int c = i;
      while (bef[c - 'a']) {
        c = bef[c - 'a'];
        if (used[c - 'a']) return cout << "NO", 0;
        used[c - 'a'] = 1;
        k += c;
      }
    }
  }
  if (!int(k.size())) return cout << "NO", 0;
  for (int i = 'a'; i <= 'z'; i++) {
    if (have[i - 'a']) {
      for (int j = 0; j < int(k.size()); j++) {
        if (k[j] == i) break;
        if (j == int(k.size()) - 1) return cout << "NO", 0;
      }
    }
  }
  cout << k;
  return 0;
}
