#https://codeforces.com/problemset/problem/886/D
def is_circle(d):
    used  = {x:False for x in d}
    s_arr = []
    
    for x in used:
        if used[x] == False:
            cur    = []
            flg    = dfs(x, d, used, cur)
            
            if flg==True:
                return True, None
            s_arr.append(cur)
            
    return False, s_arr

def dfs(u, d, used, cur):
    used[u] = True
    cur.append(u)
    flg = False
    
    for v in d[u]:
        if used[v] == True:
            return True
        
        flg = dfs(v, d, used, cur)
        
        if flg==True:
            return flg
    return flg

def push(d, u, v=None):
    if u not in d:
        d[u] = set()
    
    if v is not None:
        if v not in d:
            d[v] = set()
        d[u].add(v)
    
def is_deg_valid(d):
    for u in d:
        if len(d[u]) > 1:
            return True
    return False

def solve():
    n = int(input())
    d = {}
    for _ in range(n):
        s = input()
        if len(s) == 1:
            push(d, s)
        else:
            for u, v in zip(s[:-1], s[1:]):
                push(d, u, v)
    
    flg, arr = is_circle(d)
    
    if is_deg_valid(d) or flg==True:
        return 'NO'
    
    S = [''.join(x) for x in arr]
    S = sorted(S)
    return ''.join([s for s in S])
        
print(solve())

#4
#mail
#ai
#lru
#cf

#3
#kek
#preceq
#cheburek