#include <bits/stdc++.h>
using namespace std;
pair<int, int> find(string &s1, string &s2) {
  for (int i = 0; i < s1.size(); i++)
    for (int j = 0; j < s2.size(); j++)
      if (s1[i] == s2[j]) return {i, j};
  return {-1, -1};
}
int main() {
  int n;
  cin >> n;
  vector<string> s(n);
  for (int i = 0; i < n; i++) {
    cin >> s[i];
    vector<bool> was(26, false);
    for (int j = 0; j < s[i].size(); j++) {
      char c = s[i][j] - 'a';
      if (was[c]) {
        cout << "NO";
        return 0;
      }
      was[c] = true;
    }
  }
  vector<string> ans;
  ans.push_back(s[0]);
  for (int i = 1; i < n; i++) {
    int cnt = 0;
    for (int j = 0; j < ans.size(); j++) {
      pair<int, int> symb = find(ans[j], s[i]);
      if (symb.first != -1) {
        cnt++;
        int a, b;
        for (a = symb.first, b = symb.second;
             a < ans[j].size() && b < s[i].size(); a++, b++)
          if (ans[j][a] != s[i][b]) {
            cout << "NO";
            return 0;
          }
        if (symb.second == 0 && b == s[i].size())
          continue;
        else if (symb.first == 0 && symb.second != 0)
          for (int t = 0; t < symb.second; t++) ans[j] = s[i][t] + ans[j];
        else
          for (int t = b; t < s[i].size(); t++) ans[j].push_back(s[i][t]);
      }
      vector<bool> was(26, false);
      for (int k = 0; k < ans[j].size(); k++) {
        char c = ans[j][k] - 'a';
        if (was[c]) {
          cout << "NO";
          return 0;
        }
        was[c] = true;
      }
    }
    if (cnt > 1) {
      cout << "NO";
      return 0;
    } else if (cnt == 0)
      ans.push_back(s[i]);
  }
  sort(ans.begin(), ans.end());
  for (int i = 0; i < ans.size(); i++) cout << ans[i];
}
