import java.io.*;
import java.util.*;

public class Main {
    static int get(char c) {
        return Character.getNumericValue(c) - Character.getNumericValue('a');
    }

    static void solve() throws IOException {
        int next[] = new int[26];
        int previous[] = new int[26];
        Arrays.fill(next, -1);
        Arrays.fill(previous, -1);
        boolean lonely[] = new boolean[26];
        int n = ni1();
        boolean exist = true;
        for (int i = 0; i < n; i++) {
            String s = input.readLine();
            int len = s.length();
            if (len == 1) {
                int u = get(s.charAt(0));
                if (next[u] == -1 && previous[u] == -1) lonely[u] = true;
                continue;
            }
            for (int j = 0; j < len - 1; j++) {
                int u = get(s.charAt(j));
                int v = get(s.charAt(j + 1));
                if (next[u] > -1 && next[u] != v) {
                    exist = false;
                    break;
                }
                if (previous[v] > -1 && previous[v] != u) {
                    exist = false;
                    break;
                }
                next[u] = v;
                previous[v] = u;
                lonely[u] = lonely[v] = false;
            }
            if (!exist) break;
        }


        if (exist) {
            boolean visited[] = new boolean[26];
            for (int i = 0; i < 26; i++) {
                if (previous[i] != -1) continue;
                if (visited[i]) continue;
                if (previous[i] == -1 && next[i] == -1) continue;
                int j = i;
                while (true) {
                    visited[j] = true;
                    if (next[j] == -1) break;
                    j = next[j];
                }
            }
            for (int i = 0; i < 26; i++) {
                if (next[i] != -1 && previous[i] != -1 && !visited[i]) {
                    exist = false;
                    break;
                }
            }
        }

        if (!exist) ans.append("NO\n");
        else {
            boolean visited[] = new boolean[26];
            ArrayList<String> list = new ArrayList<>();
            for (int i = 0; i < 26; i++) {
                if (previous[i] != -1) continue;
                if (visited[i]) continue;
                if (previous[i] == -1 && next[i] == -1) {
                    if (lonely[i]) list.add(Character.toString((char) (i + 97)));
                    continue;
                }
                int j = i;
                StringBuilder res = new StringBuilder();
                while (true) {
                    res.append((char) (j + 97));
                    visited[j] = true;
                    if (next[j] == -1) break;
                    j = next[j];
                }
                list.add(res.toString());
            }
            Collections.sort(list);
            int len = list.size();
            for (int i = 0; i < len; i++) ans.append(list.get(i));
            ans.append('\n');
        }
        output.write(ans.toString());
        output.flush();
        output.close();
    }

    public static void main(String[] args) throws IOException {
        new Main().solve();
    }

    static BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
    static BufferedWriter output = new BufferedWriter(new OutputStreamWriter(System.out));
    static StringBuilder ans = new StringBuilder();
    static String line;
    static StringTokenizer stringTokenizer;

    static int ni1() throws IOException {
        return Integer.parseInt(input.readLine());
    }

    static int ni2() throws IOException {
        return Integer.parseInt(stringTokenizer.nextToken());
    }

    static long nl1() throws IOException {
        return Long.parseLong(input.readLine());
    }

    static long nl2() {
        return Long.parseLong(stringTokenizer.nextToken());
    }

    static void rl() throws IOException {
        stringTokenizer = new StringTokenizer(input.readLine());
    }
}
