#include <bits/stdc++.h>
using namespace std;
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T &x) {
  int f = 0;
  cerr << '{';
  for (auto &i : x) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
const int M = 100 + 5;
const int MOD = 1e9 + 7;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<int> to(26, -1), from(26, -1), cnt(26, 0);
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    for (int j = 0; j + 1 < s.size(); j++) {
      int cur = s[j] - 'a', nxt = s[j + 1] - 'a';
      if (to[cur] != -1 and to[cur] != nxt) return cout << "NO", 0;
      to[cur] = nxt, from[nxt] = cur;
      cnt[cur] = cnt[nxt] = 1;
    }
  }
  int tot = count(cnt.begin(), cnt.end(), 1);
  string ans;
  for (int i = 0; i < 26; i++) {
    if (from[i] == -1 and cnt[i]) {
      int cur = i;
      while (cur != -1) {
        ans.push_back((char)(cur + 'a'));
        cur = to[cur];
      }
    }
  }
  if (ans.size() != tot)
    cout << "NO";
  else
    cout << ans;
}
