#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9;
const long long MOD = 998244353;
const long long maxn = 1e5 + 1;
long long RAND(long long n) { return abs((rand() << 15) + rand()) % n; }
long long n, used[1000], used_v[1000], tf = 0, neg[1000];
string str;
vector<set<int> > g(1000);
vector<int> ans;
void dfs(long long v) {
  if (g[v].size() > 1) tf = 1;
  ans.push_back(v);
  used_v[v] = 1;
  for (auto i = g[v].begin(); i != g[v].end(); ++i)
    if (!used_v[*i])
      dfs(*i);
    else
      tf = 1;
}
void solveTask() {
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> str;
    for (int j = 0; j < str.size() - 1; ++j) {
      g[(int)str[j]].insert((int)str[j + 1]);
      used[(int)str[j]] = 1, used[(int)str[j + 1]] = 1;
      neg[(int)str[j + 1]] = 1;
    }
  }
  for (int i = 97; i <= 122; ++i)
    if (used[i] && !used_v[i] && !neg[i]) dfs(i);
  if (tf) {
    cout << "NO";
    return;
  }
  for (int i = 0; i < ans.size(); ++i) cout << (char)ans[i];
}
int main() {
  ios_base::sync_with_stdio(0);
  srand(time(0));
  solveTask();
  return 0;
}
