N = int(eval(input()))

W = []

for i in range(0,N):

    W.append(eval(input()))

    

result = 'Yes'



for i,w in enumerate(W):

    if i>0 and W[i-1][-1] != W[i][0]:

        result = 'No'



Wset = set(W)



if len(W) != len(Wset):

    result = 'No'

    

print(result)
# PROXY



N = int(eval(input()))

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

def has_duplicates(seq):

    return len(seq) != len(set(seq))    

if has_duplicates(list):

    print("No")

else:

    i = 1

    while i < N:

        if list[i-1][-1] != list[i][0]:

            print("No")

            break

        else:

            i += 1

    else:

        print("Yes")
N = int(eval(input()))
W = []
for i in range(0, N):
    W.append(eval(input()))
result = "Yes"
for i, w in enumerate(W):
    if i > 0 and W[i - 1][-1] != W[i][0]:
        result = "No"
Wset = set(W)
if len(W) != len(Wset):
    result = "No"
print(result)

# PROXY
N = int(eval(input()))
list = [eval(input()) for i in range(N)]


def has_duplicates(seq):
    return len(seq) != len(set(seq))


if has_duplicates(list):
    print("No")
else:
    i = 1
    while i < N:
        if list[i - 1][-1] != list[i][0]:
            print("No")
            break
        else:
            i += 1
    else:
        print("Yes")

+# PROXY -W = [] -for i in range(0, N): -    W.append(eval(input())) -result = "Yes" -for i, w in enumerate(W): -    if i > 0 and W[i - 1][-1] != W[i][0]: -        result = "No" -Wset = set(W) -if len(W) != len(Wset): -    result = "No" -print(result) +list = [eval(input()) for i in range(N)] + + +def has_duplicates(seq): +    return len(seq) != len(set(seq)) + + +if has_duplicates(list): +    print("No") +else: +    i = 1 +    while i < N: +        if list[i - 1][-1] != list[i][0]: +            print("No") +            break +        else: +            i += 1 +    else: +        print("Yes")