#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<string> a(n);
  vector<int> g(26, -1), p(26, -1);
  vector<bool> st(26, false), vis(26, false);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  for (auto el : a) {
    for (int i = 0; i < el.size(); ++i) {
      int t = el[i] - 'a';
      vis[t] = true;
      if (i < el.size() - 1 && g[t] == -1) {
        g[t] = el[i + 1] - 'a';
        if (p[el[i + 1] - 'a'] != -1 && p[el[i + 1] - 'a'] != el[i] - 'a') {
          cout << "NO";
          return 0;
        } else {
          p[el[i + 1] - 'a'] = el[i] - 'a';
        }
      } else if (i < el.size() - 1 && g[t] == el[i + 1] - 'a' ||
                 i == el.size() - 1) {
        continue;
      } else {
        cout << "NO";
        return 0;
      }
    }
  }
  for (int i = 0; i < 26; ++i) {
    for (int j = g[i]; j != -1; j = g[j]) {
      if (j == i) {
        cout << "NO";
        return 0;
      }
    }
  }
  for (int i = 0; i < 26; ++i) {
    if (vis[i] && p[i] == -1) {
      for (int j = i; j != -1; j = g[j]) {
        cout << char('a' + j);
      }
    }
  }
}
