import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Random;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class Solution{
	
	static int n;
	static HashSet<Integer>[] g, rg;
	static boolean[] present;
	static StringBuilder ans;
	
	
	
    public static void main(String[] args) throws IOException {
    	
		
    	FastScanner fs = new FastScanner();
    	PrintWriter out = new PrintWriter(System.out);
    		
    	int tt = 1;
    	while(tt-->0) {
    		
    		n = fs.nextInt();
    		g = new HashSet[26];
    		rg = new HashSet[26];
    		
    		for(int i=0;i<26;i++) {
    			g[i] = new HashSet<Integer>();
    			rg[i] = new HashSet<Integer>();
    		}
    		
    		present = new boolean[26];
    		
    		for(int i=0;i<n;i++) {
    			char[] s = fs.next().toCharArray();
    			for(int j=0;j<s.length-1;j++) {
    				g[s[j]-'a'].add(s[j+1]-'a');
    				rg[s[j+1]-'a'].add(s[j]-'a');
    			}
    			for(int j=0;j<s.length;j++) present[s[j]-'a'] = true;
    		}
    		
    		HashSet<Integer>[] G = g;
    		
    		ans = new StringBuilder("");
    		
    		for(int i=0;i<26;i++) {
    			if(g[i].size()>1 || rg[i].size()>1) {
    				out.println("NO");
    				out.flush();
    				return;
    			}
    		}
    		
    		for(int i=0;i<26;i++) {
    			if(rg[i].size()==0 && present[i]) {
    				dfs(i);
    			}
    		}
    		
    		for(int i=0;i<26;i++) {
    			if(present[i]) {
    				out.println("NO");
    				out.flush();
    				return;
    			}
    		}
    		
    		out.println(ans.toString());
    		
    		
    		
    		
    			
    			
    			
    			
    		
    		
    		
    		
    		
    		
    		
    	}
    	
    	out.close();
    		
    }
    
    
    static void dfs(int v) {
    	present[v] = false;
    	ans.append((char)('a'+v));
    	for(int u: g[v]) {
    		dfs(u);
    	}
    }
    
   
    
    
   
   
    
    
    static final Random random=new Random();
    
    static <T> void shuffle(T[] arr) {
    	int n = arr.length;
    	for(int i=0;i<n;i++	) {
    		int k = random.nextInt(n);
    		T temp = arr[k]; arr[k] = arr[i]; arr[i] = temp;
    	}
    }
    
    	
    static void ruffleSort(int[] a) {
    	int n=a.length;//shuffle, then sort 
    	for (int i=0; i<n; i++) {
    		int oi=random.nextInt(n); int temp=a[oi];
    		a[oi]=a[i]; a[i]=temp;
    	}
    	Arrays.sort(a);
    }
    
    static void ruffleSort(long[] a) {
    	int n=a.length;//shuffle, then sort 
    	for (int i=0; i<n; i++) {
    		int oi=random.nextInt(n); long temp=a[oi];
    		a[oi]=a[i]; a[i]=temp;
    	}
    	Arrays.sort(a);
    }
   
  
    
    static void reverse(int[] arr, int l, int r) {
    	for(int i=l;i<l+(r-l)/2;i++){
    		int temp = arr[i]; arr[i] = arr[r-i+l-1]; arr[r-i+l-1] = temp;
    	}
    }
    
    static void reverse(long[] arr, int l, int r) {
    	for(int i=l;i<l+(r-l)/2;i++){
    		long temp = arr[i]; arr[i] = arr[r-i+l-1]; arr[r-i+l-1] = temp;
    	}
    }
    
    
    static <T> void reverse(T[] arr, int l, int r) {
    	for(int i=l;i<l+(r-l)/2;i++) {
    		T temp = arr[i]; arr[i] = arr[r-i+l-1]; arr[r-i+l-1] = temp;
    	}
    }
    	
    	
    static class FastScanner{
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	StringTokenizer st = new StringTokenizer("");
     
    	public String next(){
    		while(!st.hasMoreElements()){
    			try{
    				st = new StringTokenizer(br.readLine());
    			} catch(IOException e){
    				e.printStackTrace();
    			}
    		}
    		return st.nextToken();
    	}
    		
    	public String nextLine() throws IOException {
    		return br.readLine();
    	}
    		
    	public int nextInt(){
    		return Integer.parseInt(next());
    	}
     
    	public int[] readArray(int n){
    		int[] a = new int[n];
    		for(int i=0;i<n;i++)
    			a[i] = nextInt();
    		return a;
    	}
    		
    	public long nextLong() {
    		return Long.parseLong(next());
    	}
    		
    	public char nextChar() {
    		return next().toCharArray()[0];
    	}
    }
   	
}
