from collections import defaultdict

def solve():

    N = int(eval(input()))

    d = defaultdict(int)

    prev = []



    for i in range(N):

        w = eval(input())

        if d[w] == 1:

            print('No')

            return

        d[w] += 1

        w_list = list(w)

        if i != 0 and w_list[0] != prev[-1]:

            print('No')

            return



        prev = w_list 

    else:

        print('Yes')



if __name__ == '__main__':

    solve()
def solve():

    N = int(eval(input()))

    W = [eval(input()) for i in range(N)]



    for i in range(N):

        for j in range(i+1,N):

            if W[i] == W[j]:

                print('No')

                return

    

    for i in range(N-1):

        if W[i][-1] != W[i+1][0]:

            print('No')

            return

    

    print('Yes')



if __name__ == '__main__':

    solve()
from collections import defaultdict


def solve():
    N = int(eval(input()))
    d = defaultdict(int)
    prev = []
    for i in range(N):
        w = eval(input())
        if d[w] == 1:
            print("No")
            return
        d[w] += 1
        w_list = list(w)
        if i != 0 and w_list[0] != prev[-1]:
            print("No")
            return
        prev = w_list
    else:
        print("Yes")


if __name__ == "__main__":
    solve()

def solve():
    N = int(eval(input()))
    W = [eval(input()) for i in range(N)]
    for i in range(N):
        for j in range(i + 1, N):
            if W[i] == W[j]:
                print("No")
                return
    for i in range(N - 1):
        if W[i][-1] != W[i + 1][0]:
            print("No")
            return
    print("Yes")


if __name__ == "__main__":
    solve()

-from collections import defaultdict - - -    d = defaultdict(int) -    prev = [] +    W = [eval(input()) for i in range(N)] -        w = eval(input()) -        if d[w] == 1: +        for j in range(i + 1, N): +            if W[i] == W[j]: +                print("No") +                return +    for i in range(N - 1): +        if W[i][-1] != W[i + 1][0]: -        d[w] += 1 -        w_list = list(w) -        if i != 0 and w_list[0] != prev[-1]: -            print("No") -            return -        prev = w_list -    else: -        print("Yes") +    print("Yes")