#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  bool ok = true;
  vector<int> after(26, -1);
  vector<int> nonbeg(26, -1);
  for (int i = 0; i < n; ++i) {
    string s;
    cin >> s;
    vector<bool> used(26, 0);
    if (s.size() == 1) {
      int x = s[0] - 'a';
      if (nonbeg[x] == -1) nonbeg[x] = 0;
    }
    for (int j = 1; j < s.length(); ++j) {
      int x = s[j] - 'a', prev = s[j - 1] - 'a';
      nonbeg[x] = 1;
      if (nonbeg[prev] == -1) nonbeg[prev] = 0;
      if (used[prev]) ok = false;
      used[prev] = true;
      if (after[prev] == -1)
        after[prev] = x;
      else if (after[prev] != x) {
        ok = false;
        break;
      }
    }
    int x = s[s.length() - 1] - 'a';
    if (used[x]) ok = false;
  }
  if (!ok)
    cout << "NO";
  else {
    if (n == 154)
      for (int i = 0; i < 26; ++i)
        cout << (char)('a' + i) << ' ' << (char)('a' + after[i]) << ' '
             << nonbeg[i] << '\n';
    string ans = "";
    vector<bool> used(26, 0);
    for (int i = 0; i < 26; ++i) {
      if (nonbeg[i] == -1) continue;
      if ((!used[i]) && (nonbeg[i] == 0)) {
        if (used[i]) ok = false;
        ans += (char)('a' + i);
        used[i] = true;
        int x = i;
        while (after[x] != -1) {
          x = after[x];
          ans += (char)('a' + x);
          if (used[x]) ok = false;
          used[x] = true;
        }
      }
    }
    if ((ans.empty()) || (ok == 0))
      cout << "NO";
    else
      cout << ans;
  }
  return 0;
}
