#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
using namespace std;
const long long mod = 1e9 + 7;
const int phash = 3;
const long long modhash = 1000000000000000003;
const long long INF = 1e12;
string s[100005];
bool used[26];
bool cnt[100005][26];
set<int> g[26], gr[26];
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> s[i];
    for (int j = 0; j < s[i].size(); j++) {
      used[s[i][j] - 'a'] = true;
      if (cnt[i][s[i][j] - 'a']) {
        cout << "NO";
        return 0;
      }
      cnt[i][s[i][j] - 'a'] = true;
    }
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < s[i].size() - 1; j++) {
      g[s[i][j] - 'a'].insert(s[i][j + 1] - 'a');
      gr[s[i][j + 1] - 'a'].insert(s[i][j] - 'a');
    }
  for (int i = 0; i < 26; i++)
    if (g[i].size() > 1) {
      cout << "NO";
      return 0;
    }
  vector<string> ans;
  for (int i = 0; i < 26; i++) {
    if (used[i] && !gr[i].size()) {
      string cur;
      int pos = i;
      while (true) {
        used[pos] = false;
        cur += (char)('a' + pos);
        if (!g[pos].size()) break;
        if (!used[*g[pos].begin()]) {
          cout << "NO";
          return 0;
        }
        pos = *g[pos].begin();
      }
      ans.push_back(cur);
    }
  }
  sort(ans.begin(), ans.end());
  for (auto it : ans) cout << it;
}
