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