#include <bits/stdc++.h>
using namespace std;
enum Value { White, Gray, Black };
vector<vector<long long int>> data(26, vector<long long int>(26));
vector<vector<long long int>> data_oriented(26, vector<long long int>(26));
vector<string> result;
vector<long long int> colors(26, White);
void DFS1(long long int v, long long int p);
void DFS2(long long int v);
int main() {
  long long int n = 0;
  cin >> n;
  vector<bool> starts(26);
  for (long long int i = 0; i < n; i++) {
    string current;
    cin >> current;
    for (long long int j = 0; j < current.size() - 1; j++) {
      data[current[j] - 'a'][current[j + 1] - 'a'] = 1;
      data[current[j + 1] - 'a'][current[j] - 'a'] = 1;
      data_oriented[current[j] - 'a'][current[j + 1] - 'a'] = 1;
    }
    for (long long int j = 0; j < current.size(); j++)
      starts[current[j] - 'a'] = true;
  }
  for (long long int i = 0; i < colors.size(); i++)
    if (colors[i] == White) DFS1(i, -1);
  for (long long int i = 0; i < data_oriented.size(); i++) {
    for (long long int j = 0; j < data_oriented[i].size(); j++)
      if (data_oriented[i][j] == 1) starts[j] = false;
  }
  for (long long int i = 0; i < starts.size(); i++) {
    if (starts[i]) {
      result.push_back(string());
      result.back().push_back((char)((long long int)'a' + i));
      DFS2(i);
    }
  }
  sort(result.begin(), result.end());
  for (long long int i = 0; i < result.size(); i++) cout << result[i];
  return 0;
}
void DFS1(long long int v, long long int p) {
  if (colors[v] == Black) return;
  if (colors[v] == Gray) {
    cout << "NO";
    exit(0);
  }
  colors[v] = Gray;
  for (long long int j = 0; j < data[v].size(); j++)
    if ((data[v][j] == 1) && (j != p)) DFS1(j, v);
  colors[v] = Black;
}
void DFS2(long long int v) {
  long long int cnt = 0;
  for (long long int j = 0; j < data_oriented[v].size(); j++) {
    if (data_oriented[v][j] == 0) continue;
    if (cnt > 0) result.push_back(result.back());
    result.back().push_back((char)((long long int)'a' + j));
    DFS2(j);
    cnt++;
  }
}
