#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
const int MAX = 1e5 + 10;
string str;
int dir[30];
bool vis[30];
int du[30];
string ans;
bool add(int s) {
  while (s) {
    if (vis[s]) {
      return 0;
    }
    vis[s] = 1;
    ans += (char)(s + 'a' - 1);
    s = dir[s];
  }
  return 1;
}
int is_vis[30];
int main() {
  int n;
  scanf("%d", &n);
  int flag = 1;
  for (int i = 0; i < n; i++) {
    cin >> str;
    int len = str.size();
    for (int j = 1; j < len; j++) {
      if (dir[str[j - 1] - 'a' + 1] != str[j] - 'a' + 1 &&
          dir[str[j - 1] - 'a' + 1] != 0) {
        flag = 0;
        break;
      }
      dir[str[j - 1] - 'a' + 1] = str[j] - 'a' + 1;
      du[str[j] - 'a' + 1]++;
      is_vis[str[j] - 'a' + 1] = 1;
      is_vis[str[j - 1] - 'a' + 1] = 1;
    }
  }
  vector<int> now;
  for (int i = 1; i <= 26; i++) {
    if (!du[i] && is_vis[i]) now.push_back(i);
  }
  sort(now.begin(), now.end());
  if (now.size() == 0) {
    puts("NO");
    return 0;
  }
  for (auto &u : now) {
    if (!add(u)) {
      puts("NO");
      return 0;
    }
  }
  cout << ans << endl;
  return 0;
}
