import sys

N=int(eval(input()))

a=[[] for i in range(N)]

for i in range(N):

    a[i]=eval(input())

    

for i in range(N):

    if i>0:

        if a[i-1][len(a[i-1])-1]!=a[i][0]:

            print("No")

            sys.exit()



for i in range(N):

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

        if a[i] == a[N-j]:

                print("No")

                sys.exit()



print("Yes")

#!/usr/bin/python

# -*- coding: utf-8 -*-

n = int(input())

s = []

for _ in range(n):

    s.append(input())



ss = set()

last = None

ret = 'Yes'

for w in s:

    if w in ss:

        ret = 'No'

        break

    if last is None:

        ss.add(w)

        last = w

        continue

    if last[-1] != w[0]:

        ret = 'No'

        break

    ss.add(w)

    last = w



print(ret)
import sys

N = int(eval(input()))
a = [[] for i in range(N)]
for i in range(N):
    a[i] = eval(input())
for i in range(N):
    if i > 0:
        if a[i - 1][len(a[i - 1]) - 1] != a[i][0]:
            print("No")
            sys.exit()
for i in range(N):
    for j in range(1, N - i - 1):
        if a[i] == a[N - j]:
            print("No")
            sys.exit()
print("Yes")

#!/usr/bin/python
# -*- coding: utf-8 -*-
n = int(input())
s = []
for _ in range(n):
    s.append(input())
ss = set()
last = None
ret = "Yes"
for w in s:
    if w in ss:
        ret = "No"
        break
    if last is None:
        ss.add(w)
        last = w
        continue
    if last[-1] != w[0]:
        ret = "No"
        break
    ss.add(w)
    last = w
print(ret)

-import sys - -N = int(eval(input())) -a = [[] for i in range(N)] -for i in range(N): -    a[i] = eval(input()) -for i in range(N): -    if i > 0: -        if a[i - 1][len(a[i - 1]) - 1] != a[i][0]: -            print("No") -            sys.exit() -for i in range(N): -    for j in range(1, N - i - 1): -        if a[i] == a[N - j]: -            print("No") -            sys.exit() -print("Yes") +#!/usr/bin/python +# -*- coding: utf-8 -*- +n = int(input()) +s = [] +for _ in range(n): +    s.append(input()) +ss = set() +last = None +ret = "Yes" +for w in s: +    if w in ss: +        ret = "No" +        break +    if last is None: +        ss.add(w) +        last = w +        continue +    if last[-1] != w[0]: +        ret = "No" +        break +    ss.add(w) +    last = w +print(ret)