#include <bits/stdc++.h>
using namespace std;
int n;
string s, ans;
bool b[1000], pred[1000];
int a[1000];
int main() {
  ios_base ::sync_with_stdio(false);
  int i, j;
  for (i = 0; i <= 800; i++) {
    b[i] = false;
    pred[i] = false;
    a[i] = -1;
  }
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> s;
    for (j = 0; j < s.length() - 1; j++) {
      int v = (int)s[j];
      int to = (int)s[j + 1];
      b[v] = b[to] = true;
      pred[to] = true;
      if ((a[v] > -1 && a[v] != to) || (v == to)) {
        cout << "NO";
        return 0;
      }
      a[v] = to;
    }
  }
  for (i = 0; i <= 800; i++) {
    if (b[i] == true && pred[i] == false) {
      ans += (char)i;
      b[i] = false;
      int v = i;
      while (a[v] > -1) {
        v = a[v];
        ans += (char)v;
        b[v] = false;
      }
    }
  }
  for (i = 0; i <= 800; i++)
    if (b[i] == true) {
      cout << "NO";
      return 0;
    }
  cout << ans;
  return 0;
}
