#include <bits/stdc++.h>
using namespace std;
template <class A, class B>
inline bool mina(A &first, B second) {
  return (first > second) ? (first = second, 1) : 0;
}
template <class A, class B>
inline bool maxa(A &first, B second) {
  return (first < second) ? (first = second, 1) : 0;
}
const int MAXN = 1e5 + 5;
int N;
string in[MAXN];
int nxt[26];
int pre[26];
bool have[26];
bool contains[26];
int main() {
  memset(nxt, -1, sizeof(nxt));
  memset(pre, -1, sizeof(pre));
  cin >> N;
  for (int i = 0; (i) < (N); ++(i)) {
    cin >> in[i];
    for (int j = 0; (j) < (((int)(in[i]).size())); ++(j))
      have[in[i][j] - 'a'] = true;
    for (int j = 0; (j) < (((int)(in[i]).size()) - 1); ++(j)) {
      int u = in[i][j] - 'a';
      int v = in[i][j + 1] - 'a';
      if (pre[v] != -1 && pre[v] != u) {
        cout << "NO" << endl;
        return 0;
      }
      if (nxt[u] != -1 && nxt[u] != v) {
        cout << "NO" << endl;
        return 0;
      }
      nxt[u] = v;
      pre[v] = u;
    }
  }
  vector<string> ans;
  for (int i = 0; (i) < (26); ++(i)) {
    if (nxt[i] != -1 && pre[i] == -1) {
      int now = i;
      string temp = "";
      temp += 'a' + now;
      while (nxt[now] != -1) {
        now = nxt[now];
        temp += 'a' + now;
      }
      ans.push_back(temp);
    } else if (nxt[i] == -1 && pre[i] == -1 && have[i]) {
      string temp = "";
      temp += 'a' + i;
      ans.push_back(temp);
    }
  }
  sort(ans.begin(), ans.end());
  string ans2 = "";
  for (auto s : ans) {
    ans2 += s;
  }
  for (char c : ans2) {
    contains[c - 'a'] = true;
  }
  for (int i = 0; (i) < (26); ++(i)) {
    if (have[i] && !contains[i]) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << ans2 << endl;
  return 0;
}
