#include <bits/stdc++.h>
using namespace std;
int adj[30], need[30], indeg[30], vis[30];
bool cycle(int u) {
  vis[u] = 1;
  if (adj[u] != -1) {
    if (vis[adj[u]])
      return true;
    else
      return cycle(adj[u]);
  }
  return false;
}
int main() {
  memset(adj, -1, sizeof adj);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    for (char c : s) need[c - 'a'] = 1;
    for (int j = 0; j + 1 < s.size(); j++) {
      int cur = s[j] - 'a';
      int nxt = s[j + 1] - 'a';
      if (adj[cur] != -1 && adj[cur] != nxt) {
        cout << "NO" << endl;
        return 0;
      }
      if (adj[cur] != nxt) indeg[nxt]++;
      adj[cur] = nxt;
    }
  }
  for (int i = 0; i < 26; i++)
    if (indeg[i] > 1) {
      cout << "NO" << endl;
      return 0;
    }
  int found = 0;
  for (int i = 0; i < 26; i++)
    if (need[i] && indeg[i] == 0) {
      found = 1;
      if (cycle(i)) {
        cout << "NO" << endl;
        return 0;
      }
    }
  if (!found) {
    cout << "NO" << endl;
    return 0;
  }
  string res = "";
  for (int i = 0; i < 26; i++)
    if (need[i] && indeg[i] == 0) {
      for (int j = i; j != -1; j = adj[j]) {
        res += char('a' + j);
        need[j] = 0;
      }
    }
  cout << res << endl;
  return 0;
}
