#include <bits/stdc++.h>
using namespace std;
vector<int> g[28];
int in[28];
int vis[28] = {0};
int cnt = 0;
string ans[100005];
bool FIND(int u, int v) {
  for (int i : g[u]) {
    if (i == v) return 0;
  }
  return 1;
}
void dfs(int u) {
  vis[u] = 2;
  ans[cnt] += u + 'a';
  if (g[u].size() > 1) {
    cout << "NO";
    exit(0);
  }
  for (int v : g[u]) {
    if (vis[v] == 2) {
      cout << "NO";
      exit(0);
    }
    dfs(v);
  }
}
int main() {
  int n;
  cin >> n;
  string second[n + 5];
  for (int i = 0; i < n; i++) cin >> second[i];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < second[i].size() - 1; j++) {
      int u = second[i][j] - 'a', v = second[i][j + 1] - 'a';
      if (FIND(u, v)) {
        g[u].push_back(v);
        in[v]++;
        vis[u] = 1;
        vis[v] = 1;
      }
    }
    vis[second[i].back() - 'a'] = 1;
  }
  for (int i = 0; i < 26; i++) {
    if (vis[i] == 1 && in[i] == 0) {
      dfs(i);
      cnt++;
    }
  }
  for (int i = 0; i < 26; i++) {
    if (vis[i] == 1) {
      cout << "NO";
      return 0;
    }
  }
  sort(ans, ans + cnt);
  for (int i = 0; i < cnt; i++) cout << ans[i];
}
