#include <bits/stdc++.h>
using namespace std;
template <typename T>
void out(T x) {
  cout << x << endl;
  exit(0);
}
const long long mod = 1e9 + 7;
const int maxn = 1e6 + 5;
bool have[26];
int indeg[26];
int g[26];
void add(string s) {
  int n = s.length();
  for (int i = 0; i + 1 < n; i++) {
    int x = s[i] - 'a';
    int y = s[i + 1] - 'a';
    if (g[x] == -1) {
      g[x] = y;
    } else {
      if (g[x] != y) {
        out("NO");
      }
    }
    indeg[y]++;
    have[x] = have[y] = true;
  }
  have[s[0] - 'a'] = true;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  memset(g, -1, sizeof(g));
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    add(s);
  }
  string res;
  for (int i = 0; i < 26; i++) {
    if (indeg[i] > 0) continue;
    if (!have[i]) continue;
    for (int j = i; j != -1; j = g[j]) {
      if (!have[j]) {
        out("NO");
      }
      res += char(j + 'a');
      have[j] = false;
    }
  }
  for (int i = 0; i < 26; i++) {
    if (have[i]) out("NO");
  }
  out(res);
  return 0;
}
