#include <bits/stdc++.h>
using namespace std;
const int N = 1e5;
const int oo = 1e9 + 5;
const long long mod = 1e9 + 7;
pair<int, pair<int, int> > miii(int x1, int koxuixeo, int z1) {
  pair<int, pair<int, int> > now;
  now.first = x1;
  now.second.first = koxuixeo;
  now.second.second = z1;
  return now;
}
long long sqr(long long x) { return x * x; }
int n;
map<char, int> used, cnt;
map<char, char> Next;
string res;
bool ok = true;
void dfs(char c) {
  if (used[c]) {
    ok = false;
    return;
  }
  res.push_back(c);
  used[c] = 1;
  if (Next[c]) dfs(Next[c]);
}
int main() {
  ios_base::sync_with_stdio(false);
  set<char> start;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    string s;
    cin >> s;
    int len = s.length();
    for (int i = 0; i < len - 1; i++) {
      if (Next[s[i]] && Next[s[i]] != s[i + 1]) {
        cout << "NO";
        return 0;
      }
      Next[s[i]] = s[i + 1];
      cnt[s[i + 1]]++;
    }
    start.insert(s[0]);
  }
  auto it = start.begin();
  for (auto it = start.begin(); it != start.end(); it++)
    if (!cnt[*it]) {
      dfs(*it);
      if (!ok) {
        cout << "NO";
        return 0;
      }
    }
  if (used.size() != cnt.size()) {
    cout << "NO";
    return 0;
  }
  cout << res;
  return 0;
}
