#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  bool otv = true;
  string rez;
  map<char, char> graf, grafr;
  cin >> n;
  for (int i = 0; i < n; i++) {
    string st;
    cin >> st;
    for (int j = 0; j < st.length() - 1; j++) {
      if ((graf.count(st[j]) == 0) && (grafr.count(st[j + 1]) == 0)) {
        graf.insert(pair<char, char>(st[j], st[j + 1]));
        grafr.insert(pair<char, char>(st[j + 1], st[j]));
      }
      if ((((graf.find(st[j]))->second) != st[j + 1]) ||
          ((grafr.find(st[j + 1])->second) != st[j]))
        otv = false;
    }
  }
  if (otv) {
    map<char, char>::iterator j;
    j = graf.begin();
    for (int i = 0; i < 27, j != graf.end(); i++, j++) {
      if (grafr.count(j->first) == 0) {
        rez += j->first;
        char q = j->first;
        while (graf.count(q) != 0) {
          i++;
          q = graf.find(q)->second;
          rez += q;
          if (i >= 26) {
            i = 26;
            break;
          };
        }
      }
      if (i == 26) {
        otv = false;
        break;
      };
    }
  }
  if (rez.length() == 0) otv = false;
  if (otv) {
    cout << rez;
  } else
    cout << "NO";
  return 0;
}
