#include <bits/stdc++.h>
using namespace std;
int anterior[30], proximo[30], need[30], vis[30];
int main() {
  memset(proximo, -1, sizeof proximo);
  memset(anterior, -1, sizeof anterior);
  int n;
  cin >> n;
  int bad = 0;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    for (char c : s) need[c - 'a'] = 1;
    for (int j = 0; j + 1 < s.size(); j++) {
      int cur = s[j] - 'a';
      int nxt = s[j + 1] - 'a';
      if (proximo[cur] != -1 && proximo[cur] != nxt) bad = 1;
      if (anterior[nxt] != -1 && anterior[nxt] != cur) bad = 1;
      proximo[cur] = nxt;
      anterior[nxt] = cur;
    }
  }
  if (bad) {
    cout << "NO" << endl;
    return 0;
  }
  string res = "";
  for (int i = 0; i < 26; i++)
    if (need[i] && anterior[i] == -1) {
      for (int j = i; j != -1; j = proximo[j]) {
        need[j] = 0;
        res += char(j + 'a');
      }
    }
  for (int i = 0; i < 26; i++)
    if (need[i]) {
      cout << "NO" << endl;
      return 0;
    }
  cout << res << endl;
  return 0;
}
