#include <bits/stdc++.h>
using namespace std;
const int NMax = 100003;
const int SIGMA = 130;
int n, nr;
int viz[SIGMA], edge[SIGMA], st[SIGMA], used[SIGMA], EDG[NMax];
string x;
string tab[NMax];
void dfs(int nod) {
  viz[nod] = 1;
  if (!viz[edge[nod]] && edge[nod]) dfs(edge[nod]);
  st[++nr] = nod;
}
int main() {
  cin >> n;
  cin.get();
  for (int i = 0; i < n; ++i) {
    cin >> x;
    for (int j = 0; j < x.size() - 1; ++j) {
      used[x[j]] = 1;
      if (edge[x[j]] && edge[x[j]] != x[j + 1]) {
        cout << "NO" << '\n';
        return 0;
      }
      edge[x[j]] = x[j + 1];
    }
    used[x[x.size() - 1]] = 1;
    tab[i + 1] = x;
  }
  for (int i = 1; i <= n; ++i) {
    if (!viz[tab[i][0]]) {
      dfs(tab[i][0]);
    }
  }
  string ans;
  for (int i = nr; i >= 1; --i) {
    ans += st[i];
  }
  for (int i = 1; i <= n; ++i) {
    if (ans.find(tab[i]) == string::npos) {
      cout << "NO";
      return 0;
    }
  }
  cout << ans << '\n';
  return 0;
}
