#include <bits/stdc++.h>
using namespace std;
vector<int> g[26];
vector<string> ans;
bool visited[26] = {};
int cnt = 0;
bool dfs(int u) {
  visited[u] = 1;
  ans[cnt].push_back('a' + u);
  if (g[u].size() > 1) {
    return 0;
  }
  if (g[u].empty()) {
    return 1;
  }
  int v = g[u][0];
  if (visited[v]) {
    return 0;
  }
  return dfs(v);
}
int main() {
  int n;
  cin >> n;
  vector<string> a(n);
  vector<int> par(26, -1);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    for (int j = 0; j < a[i].size() - 1; j++) {
      g[a[i][j] - 'a'].push_back(a[i][j + 1] - 'a');
      par[a[i][j + 1] - 'a'] = a[i][j] - 'a';
    }
  }
  vector<int>::iterator ip;
  for (int i = 0; i < 26; i++) {
    sort(g[i].begin(), g[i].end());
    ip = unique(g[i].begin(), g[i].end());
    g[i].resize(distance(g[i].begin(), ip));
  }
  for (int i = 0; i < 26; i++) {
    if (par[i] == -1 && g[i].size()) {
      ans.emplace_back();
      if (!dfs(i)) {
        cout << "NO" << endl;
        return 0;
      }
      cnt++;
    }
  }
  if (ans.empty()) {
    cout << "NO" << endl;
    return 0;
  }
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i];
  }
  cout << endl;
  return 0;
}
