#include <bits/stdc++.h>
using namespace std;
string res;
int indeg[30], outdeg[30], jes[30], edge[30][30];
vector<int> G[30];
void ans(int v) {
  res += (char)(v + 'a');
  jes[v] = 0;
  for (auto u : G[v]) ans(u);
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    int k = s.size();
    for (int j = 0; j < k - 1; j++) {
      int a = s[j] - 'a';
      int b = s[j + 1] - 'a';
      if (!edge[a][b]) {
        jes[a] = jes[b] = 1;
        indeg[b]++;
        outdeg[a]++;
        edge[a][b] = 1;
        G[a].push_back(b);
      }
      if (indeg[b] > 1 || outdeg[a] > 1) {
        cout << "NO";
        return 0;
      }
    }
    jes[s[s.size() - 1] - 'a'] = 1;
  }
  for (int i = 0; i < 26; i++)
    if (!indeg[i] && jes[i]) ans(i);
  for (int i = 0; i < 26; i++)
    if (jes[i]) {
      cout << "NO";
      return 0;
    }
  cout << res;
  return 0;
}
