#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000007;
const double eps = 0.000001;
bool check(string s1, string s, unordered_set<string> &st) {
  char c = s[0];
  int i = 0;
  for (; i < s1.size(); i++)
    if (s1[i] == c) break;
  if (i == s1.size()) return false;
  st.erase(s1);
  st.erase(s);
  int j = 0;
  while (j < s.size() && i < s1.size()) {
    if (s1[i] != s[j]) {
      cout << "NO";
      exit(0);
    }
    j++;
    i++;
  }
  for (; j < s.size(); j++) s1.push_back(s[j]);
  st.insert(s1);
  return true;
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  unordered_set<string> st;
  string s;
  for (int i = 0; i < n; i++) {
    cin >> s;
    unordered_map<char, int> m;
    for (char c : s) {
      m[c]++;
      if (m[c] > 1) {
        cout << "NO";
        return 0;
      }
    }
    st.insert(s);
  }
  if (st.size() > 351) {
    cout << "NO";
    return 0;
  }
  vector<string> v;
  while (st.size()) {
    s = *st.begin();
    bool flag = true;
    for (string s1 : st) {
      if (s1 == s) continue;
      if (check(s1, s, st)) {
        flag = false;
        break;
      }
      if (check(s, s1, st)) {
        flag = false;
        break;
      }
    }
    if (flag) {
      v.push_back(s);
      st.erase(s);
    }
  }
  sort(v.begin(), v.end());
  for (string s1 : v) cout << s1;
  return 0;
}
