#include <bits/stdc++.h>
using namespace std;
bool isPrime(long long n) {
  if (n < 2) return 0;
  if (n < 4) return 1;
  if (n % 2 == 0 or n % 3 == 0) return 0;
  for (long long i = 5; i * i <= n; i += 6)
    if (n % i == 0 or n % (i + 2) == 0) return 0;
  return 1;
}
long long modexpo(long long x, long long p) {
  long long res = 1;
  x = x % 1000000007;
  while (p) {
    if (p % 2) res = res * x;
    p >>= 1;
    x = x * x % 1000000007;
    res %= 1000000007;
  }
  return res;
}
long long max(long long a, long long b) { return (a > b ? a : b); }
long long min(long long a, long long b) { return (a < b ? a : b); }
struct edge {
  long long u, v, w;
  edge(long long a, long long b, long long c) {
    u = a;
    v = b;
    w = c;
  }
};
struct node {
  long long u, v, w;
  node(long long a, long long b, long long c) {
    u = a;
    v = b;
    w = c;
  }
};
struct compare {
  bool operator()(const edge a, const edge b) { return a.w < b.w; }
  bool operator()(const pair<long long, long long> a,
                  const pair<long long, long long> b) const {
    return a.first > b.first;
  }
  bool operator()(const node a, const node b) const {
    if (a.u == b.u) {
      if (a.w == b.w) {
        return a.v < b.v;
      }
      return a.w < b.w;
    }
    return a.u < b.u;
  }
};
const long long N = 30;
set<long long> g[N], rg[N];
long long present[N];
long long n;
string a[100005];
string ans = "";
void dfs(long long x) {
  present[x] = 0;
  ans += (char)(x + 'a');
  for (long long i : g[x]) {
    dfs(i);
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    long long len = a[i].length();
    for (long long j = 0; j < len - 1; j++) {
      g[a[i][j] - 'a'].insert(a[i][j + 1] - 'a');
      rg[a[i][j + 1] - 'a'].insert(a[i][j] - 'a');
    }
    for (long long j = 0; j < len; j++) {
      present[a[i][j] - 'a'] = 1;
    }
  }
  for (long long i = 0; i < 26; i++) {
    if (g[i].size() > 1 || rg[i].size() > 1) {
      cout << "NO"
           << "\n";
      exit(0);
    }
  }
  for (long long i = 0; i < 26; i++) {
    if (rg[i].size() == 0 && present[i]) {
      dfs(i);
    }
  }
  for (long long i = 0; i < 26; i++) {
    if (present[i]) {
      cout << "NO"
           << "\n";
      exit(0);
    }
  }
  cout << ans << "\n";
}
