n = int(input())
A = []
for i in range (0,n):
    A = A + [input()]
go = [100]*26
def let(x):
    return(ord(x)-ord("a"))
def revlet(x):
    return(chr(x+ord("a")))
def ans(x):
    final = []
    for k in range (0,n):
        B = list(A[k])
        for j in range (0,len(B)-1):
            if go[let(B[j])] == 100:
                go[let(B[j])] = let(B[j+1])
            elif go[let(B[j])] == let(B[j+1]):
                g=0
            else:
                return("NO")
    if len(set(go))+go.count(100)-1 != 26:
        return("NO")
    else:
        for i in range (0, 26):
            if go[i] == -100 or go[i] == 100:
                g=0
            elif go.count(i)>0:
                g=0
            else:
                final = final + [revlet(i)]
                j = go[i]
                go[i] = -100
                if j == -100:
                    return ("NO")
                elif j != 100:
                    final = final + [revlet(j)]
                    if go[j] == -100:
                        return ("NO")
                    elif j == 100:
                        final = final + [revlet(j)]
                        go[j] = -100
                    else:
                        while go[j] != 100:
                            temp = j
                            final = final + [revlet(go[j])]
                            j = go[j]
                            go[temp] = -100
                        if j == 100:
                            final = final + [revlet(j)]
                            go[j] = -100
    return("".join(final))
print(ans(A))