#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[maxn], tf = 0;
vector<int> ans;
vector<set<int> > in(maxn), out(maxn);
string str;
void dfs(long long v) {
  used[v] = 0;
  ans.push_back(v);
  for (auto i = in[v].begin(); i != in[v].end(); ++i) {
    if (used[*i])
      dfs(*i);
    else
      tf = 1;
  }
}
void solveTask() {
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> str;
    int l = str.size();
    for (int j = 0; j < l; ++j) {
      used[(int)str[j]] = true;
      if (j != l) in[(int)str[j]].insert((int)str[j + 1]);
      if (j != 0) out[(int)str[j]].insert((int)str[j - 1]);
    }
  }
  for (int i = (int)'a'; i <= (int)'z'; ++i)
    if (in[i].size() > 1 && out[i].size() > 1) {
      cout << "NO";
      return;
    }
  for (int i = (int)'a'; i <= (int)'z'; ++i)
    if (used[i] && !out[i].size()) dfs(i);
  if (!tf)
    for (int i = 0; i < ans.size(); ++i) cout << (char)ans[i];
  else
    cout << "NO";
}
int main() {
  ios_base::sync_with_stdio(0);
  srand(time(0));
  solveTask();
  return 0;
}
