#include <bits/stdc++.h>
using namespace std;
const int maxn = 26;
int in[maxn], out[maxn];
bool mp[maxn][maxn];
bool vis[maxn];
vector<int> gp[maxn];
string ans = "";
void f(int x) {
  ans += x + 'a';
  vis[x] = 0;
  for (int i = 0; i < maxn; i++) {
    if (mp[x][i]) f(i);
  }
}
int main() {
  int n;
  cin >> n;
  string s;
  for (int i = 0; i < n; i++) {
    cin >> s;
    for (int j = 0; j < s.size() - 1; j++) {
      int a = s[j] - 'a', b = s[j + 1] - 'a';
      if (!mp[a][b]) {
        mp[a][b] = 1;
        gp[a].push_back(b);
        vis[a] = vis[b] = 1;
        in[b]++, out[a]++;
      }
    }
  }
  for (int i = 0; i < maxn; i++)
    if (in[i] > 1 || out[i] > 1) {
      cout << "NO" << endl;
      return 0;
    }
  for (int i = 0; i < maxn; i++)
    if (!in[i] && vis[i]) {
      f(i);
    }
  for (int i = 0; i < maxn; i++)
    if (vis[i]) {
      cout << "NO" << endl;
      return 0;
    }
  cout << ans << endl;
  return 0;
}
