#include <bits/stdc++.h>
using namespace std;
bool lines = 1, vis[26] = {}, isstring[26] = {}, let[26] = {};
int g[26][26] = {};
string ans;
void dfs(int u) {
  vis[u] = 1;
  ans += (char)(u + 'a');
  int cnt = 0;
  for (int j = 0; j < 26; j++) {
    if (!g[u][j]) {
      continue;
    }
    cnt++;
    if (!vis[j]) {
      dfs(j);
    } else {
      lines = 0;
    }
  }
  if (cnt > 1) {
    lines = 0;
  }
}
int main() {
  int n;
  cin >> n;
  vector<string> a(n);
  for (auto &x : a) {
    cin >> x;
    for (int j = 0; j < x.size() - 1; j++) {
      g[x[j] - 'a'][x[j + 1] - 'a'] = 1;
      let[x[j] - 'a'] = 1;
      let[x[j + 1] - 'a'] = 1;
    }
    if (x.size() == 1) {
      isstring[x[0] - 'a'] = 1;
    }
  }
  for (int i = 0; i < 26; i++) {
    int cntin = 0, cntout = 0;
    for (int j = 0; j < 26; j++) {
      cntin += g[j][i];
      cntout += g[i][j];
    }
    if (cntin + cntout == 0 && !isstring[i]) {
      continue;
    }
    if (cntin == 0 && !vis[i]) {
      dfs(i);
    }
  }
  for (int i = 0; i < 26; i++) {
    if (let[i]) {
      if (count(ans.begin(), ans.end(), (char)('a' + i)) == 0) {
        cout << "NO" << endl;
        return 0;
      }
    }
  }
  if (ans.empty() || !lines) {
    cout << "NO" << endl;
  } else {
    cout << ans << endl;
  }
  return 0;
}
