from collections import Counter

import sys

N = int(eval(input()))

lst = [str(eval(input())) for _ in range(N)]

#print(lst)

c = Counter(lst)

for i in c:

    if lst.count(i) > 1:

        print('No')

        sys.exit()



for i in range(len(lst)-1):

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

        print('No')

        sys.exit()

print('Yes')
import sys

N = int(eval(input()))

lst = [str(eval(input())) for _ in range(N)]





if len(set(lst)) != N:

    print('No')

    sys.exit()



for i in range(len(lst)-1):

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

        print('No')

        sys.exit()

print('Yes')
from collections import Counter
import sys

N = int(eval(input()))
lst = [str(eval(input())) for _ in range(N)]
# print(lst)
c = Counter(lst)
for i in c:
    if lst.count(i) > 1:
        print("No")
        sys.exit()
for i in range(len(lst) - 1):
    if lst[i][-1] != lst[i + 1][0]:
        print("No")
        sys.exit()
print("Yes")

import sys

N = int(eval(input()))
lst = [str(eval(input())) for _ in range(N)]
if len(set(lst)) != N:
    print("No")
    sys.exit()
for i in range(len(lst) - 1):
    if lst[i][-1] != lst[i + 1][0]:
        print("No")
        sys.exit()
print("Yes")

-from collections import Counter -# print(lst) -c = Counter(lst) -for i in c: -    if lst.count(i) > 1: -        print("No") -        sys.exit() +if len(set(lst)) != N: +    print("No") +    sys.exit()