def main():

    N = int(eval(input()))

    W_before = eval(input())

    W_list = set()

    W_list.add(W_before)

    for i in range(N-1):

        W_after = eval(input())

        if W_before[-1] != W_after[0]:

            print('No')

            return

        if W_after in W_list:

            print('No')

            return

        W_list.add(W_after)

        W_before = W_after

    print('Yes')



if __name__ == "__main__":

    main()

def main():

    N = int(eval(input()))

    W_before = eval(input())

    word_set = set()

    word_set.add(W_before)

    for i in range(N-1):

        W_after = eval(input())

        if W_before[-1] != W_after[0]:

            print('No')

            return

        if W_after in word_set:

            print('No')

            return

        word_set.add(W_after)

        W_before = W_after

    print('Yes')



if __name__ == "__main__":

    main()

def main():
    N = int(eval(input()))
    W_before = eval(input())
    W_list = set()
    W_list.add(W_before)
    for i in range(N - 1):
        W_after = eval(input())
        if W_before[-1] != W_after[0]:
            print("No")
            return
        if W_after in W_list:
            print("No")
            return
        W_list.add(W_after)
        W_before = W_after
    print("Yes")


if __name__ == "__main__":
    main()

def main():
    N = int(eval(input()))
    W_before = eval(input())
    word_set = set()
    word_set.add(W_before)
    for i in range(N - 1):
        W_after = eval(input())
        if W_before[-1] != W_after[0]:
            print("No")
            return
        if W_after in word_set:
            print("No")
            return
        word_set.add(W_after)
        W_before = W_after
    print("Yes")


if __name__ == "__main__":
    main()

-    W_list = set() -    W_list.add(W_before) +    word_set = set() +    word_set.add(W_before) -        if W_after in W_list: +        if W_after in word_set: -        W_list.add(W_after) +        word_set.add(W_after)