#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
string rlt;
int n;
int cnt[maxn];
bool vis[maxn];
set<int> adj[maxn];
void dfs(int u) {
  vis[u] = 1;
  if (rlt != "NO") rlt += u + 'a';
  if (adj[u].size() > 1) rlt = "NO";
  for (int it : adj[u]) {
    if (!vis[it])
      dfs(it);
    else
      rlt = "NO";
  }
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < 26; i++) vis[i] = 1;
  for (int i = 1; i <= n; i++) {
    string s;
    cin >> s;
    for (int j = 0; j < s.size(); j++) {
      vis[s[j] - 'a'] = 0;
      if (j > 0) adj[s[j - 1] - 'a'].insert(s[j] - 'a'), cnt[s[j] - 'a']++;
    }
  }
  for (int i = 0; i < 26; i++)
    if (!vis[i] && cnt[i] == 0) dfs(i);
  for (int i = 0; i < 26; i++)
    if (!vis[i]) rlt = "NO";
  cout << (rlt.empty() ? "NO" : rlt) << endl;
}
