#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  bool ar[30];
  int prev[30], next[30];
  for (int i = 0; i < 30; i++) {
    prev[i] = -1;
    next[i] = -1;
  }
  for (int i = 0; i < 30; i++) ar[i] = false;
  bool f = true;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    int l = s.length();
    for (int j = 0; j < l; j++) {
      ar[s[j] - 'a'] = true;
      if (prev[s[j] - 'a'] == -1) {
        if (j != 0) prev[s[j] - 'a'] = s[j - 1] - 'a';
      } else {
        if (prev[s[j] - 'a'] != s[j - 1] - 'a' && j != 0) f = false;
      }
      if (next[s[j] - 'a'] == -1) {
        if (j != l - 1) next[s[j] - 'a'] = s[j + 1] - 'a';
      } else {
        if (j != l - 1 && next[s[j] - 'a'] != s[j + 1] - 'a') f = false;
      }
    }
  }
  if (f == false) {
    cout << "NO";
    return 0;
  }
  string ans = "";
  bool used[30];
  for (int i = 0; i < 30; i++) used[i] = false;
  for (int i = 0; i < 26; i++) {
    int p = i;
    if (prev[i] != -1 || ar[i] == false) continue;
    do {
      ans += ('a' + p);
      used[p] = true;
      p = next[p];
    } while (p != -1);
  }
  for (int i = 0; i < 26; i++)
    if (ar[i] == true && used[i] != true) {
      cout << "NO";
      return 0;
    }
  cout << ans;
  return 0;
}
