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])
        if len(B) ==1:
            if go[let(B[0])] == 100:
                go[let(B[0])] = -1
        else:
            for j in range (0,len(B)-1):
                if go[let(B[j])] == 100 or go[let(B[j])] == -1:
                    go[let(B[j])] = let(B[j+1])
                elif go[let(B[j])] == let(B[j+1]):
                    g=0
                else:
                    return("NO")
            if go[let(B[len(B)-1])] == 100:
                go[let(B[len(B)-1])] = -1
    if len(set(go))+max(0,go.count(100)-1)+go.count(-1)-1 != 26:
        if go.count(100)>0:
            return("NO")
    else:
        for i in range (0,26):
            if go.count(i) == 0 and go[i] == -1:
                final = final + [revlet(i)]
                go[i] = -100
            elif go[i] == -100 or go[i] == 100:
                g=0
            elif go.count(i)>0:
                g=0
            else:
                final = final + [revlet(i)]
                j = go[i]
                while j != -1:
                    temp = i
                    go[temp] = -100
                    if j == -100:
                        return ("NO")
                    else:
                        final = final + [revlet(j)]
                        temp = j
                        if go[j] == -100:
                            return ("NO")
                        j = go[j]
                        go[temp] = -100
        return("".join(final))
print(ans(A))