#include <bits/stdc++.h>
using namespace std;
const int N = 500 + 10;
int n;
string s;
int g[N][N];
int vis[30];
int in[N], out[N];
int p[N];
int main() {
  cin >> n;
  int fg = 0;
  for (int i = 1; i <= n; ++i) {
    cin >> s;
    int sz = s.length();
    memset(vis, 0, sizeof(vis));
    for (int j = 0; s[j]; ++j) {
      p[s[j] - 'a'] = 1;
      if (vis[s[j] - 'a'])
        fg = 1;
      else
        vis[s[j] - 'a'] = 1;
      if (j + 1 == s.length())
        ;
      else {
        int now = s[j] - 'a';
        int nxt = s[j + 1] - 'a';
        if (!g[now][nxt]) {
          in[nxt]++;
          out[now]++;
        }
        g[now][nxt] = 1;
      }
    }
  }
  for (int i = 0; i < 26; ++i) {
    fg |= (in[i] > 1 || out[i] > 1);
  }
  if (fg) {
    puts("NO");
    return 0;
  }
  queue<int> q;
  string ans;
  for (int i = 0; i < 26; ++i) {
    if (out[i] != 0 && (in[i] == 0)) {
      q.push(i);
      --in[i];
      while (!q.empty()) {
        int u = q.front();
        q.pop();
        ans = ans + (char)('a' + u);
        for (int j = 0; j < 26; ++j)
          if (g[u][j]) {
            --in[j];
            if (in[j] == 0) {
              in[j]--;
              q.push(j);
            }
          }
      }
    } else if (p[i] && !out[i] && !in[i]) {
      ans = ans + (char)('a' + i);
    }
  }
  for (int i = 0; i < 26; ++i) {
    if (out[i] && in[i] == 0) ans.push_back('a' + i);
  }
  for (auto c : ans) {
    cout << c;
  }
}
