n = int(input())

wrong_str = False

strings = []
sets = []
for _ in range(n):
    new_string = input()
    new_string_set = set(new_string)
    if len(new_string) != len(new_string_set):
        wrong_str = True
        break

    strings.append(new_string)
    sets.append(new_string_set)

if wrong_str:
    print("NO")
    exit(0)


connections = []
for _ in range(n):
    connections.append((-1,-1))

for i in range(n):
    for j in range(i + 1, n):
        if strings[j] == None:
            continue

        if len(sets[i].intersection(sets[j])) == 0:
            continue

        a = strings[i]
        b = strings[j]

        if b in a:
            strings[j] = None
        elif a in b:
            strings[i] = b
            strings[j] = None
        else:

            is_ok = False

            start_index = a.find(b[0])
            if a[start_index:] in b:
                strings[i] += strings[j][len(a) - start_index:]
                strings[j] = None
                is_ok = True

            if not is_ok:
                start_index = b.find(a[0])
                if b[start_index:] in a:
                    strings[i] = strings[j] + strings[i][len(a) - start_index:]
                    strings[j] = None
                    is_ok = True

            if not is_ok:
                print("NO")
                exit(0)




    if wrong_str:
        print("NO")
        exit(0)

concat_str = [x for x in strings if x is not None]

whole_str = "".join(concat_str)

if len(whole_str) != len(set(whole_str)):
    print("NO")
    exit(0)

print("".join(sorted(concat_str)))



