#include <bits/stdc++.h>
using namespace std;
const int N = 110000;
int chk[30], deg[30];
char buf[N];
vector<int> con[30];
int que[30], vis[30], hello[30], pos[30];
string ans;
bool dfs(int u) {
  ans += (char)('a' + u);
  vis[u] = 1;
  if (con[u].size() > 1) return false;
  for (int v : con[u]) {
    if (vis[v])
      return false;
    else if (!dfs(v))
      return false;
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> buf;
    int len = strlen(buf);
    for (int i = 0; i < len; i++) chk[buf[i] - 'a'] = 1;
    for (int i = 1; i < len; i++)
      con[buf[i - 1] - 'a'].push_back(buf[i] - 'a'), deg[buf[i] - 'a']++;
  }
  for (int i = 0; i < 30; i++) {
    sort(con[i].begin(), con[i].end());
    con[i].erase(unique(con[i].begin(), con[i].end()), con[i].end());
  }
  for (int i = 0; i < 30; i++)
    if (chk[i] && !vis[i] && !deg[i] && !dfs(i)) {
      cout << "NO" << endl;
      return 0;
    }
  cout << ans << endl;
  return 0;
}
