import sys

 

stdin = sys.stdin

inf = 1 << 60

mod = 1000000007

 

ni = lambda: int(ns())

nin = lambda y: [ni() for _ in range(y)]

na = lambda: list(map(int, stdin.readline().split()))

nan = lambda y: [na() for _ in range(y)]

ns = lambda: stdin.readline().rstrip()

nsn = lambda y: [ns() for _ in range(y)]

ncl = lambda y: [list(ns()) for _ in range(y)]

nas = lambda: stdin.readline().split()



from collections import defaultdict



N = ni()

W = nsn(N)

d = defaultdict(int)



flag = True

for i in range(N):

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

        flag = False

    if d[W[i]] >= 1:

        flag = False

    d[W[i]] += 1



print(("Yes" if flag else "No"))
import sys



stdin = sys.stdin

inf = 1 << 60

mod = 1000000007



ni      = lambda: int(ns())

nin     = lambda y: [ni() for _ in range(y)]

na      = lambda: list(map(int, stdin.readline().split()))

nan     = lambda y: [na() for _ in range(y)]

nf      = lambda: float(ns())

nfn     = lambda y: [nf() for _ in range(y)]

nfa     = lambda: list(map(float, stdin.readline().split()))

nfan    = lambda y: [nfa() for _ in range(y)]

ns      = lambda: stdin.readline().rstrip()

nsn     = lambda y: [ns() for _ in range(y)]

ncl     = lambda y: [list(ns()) for _ in range(y)]

nas     = lambda: stdin.readline().split()



n = ni()

w = nsn(n)



flag = True

dic = dict()

last = w[0][0]

for i in range(n):

    if dic.get(w[i], False):

        flag = False

    if last != w[i][0]:

        flag = False

    last = w[i][-1]

    dic[w[i]] = True



print(("Yes" if flag else "No"))
import sys

stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
ni = lambda: int(ns())
nin = lambda y: [ni() for _ in range(y)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda y: [na() for _ in range(y)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda y: [ns() for _ in range(y)]
ncl = lambda y: [list(ns()) for _ in range(y)]
nas = lambda: stdin.readline().split()
from collections import defaultdict

N = ni()
W = nsn(N)
d = defaultdict(int)
flag = True
for i in range(N):
    if i and W[i - 1][-1] != W[i][0]:
        flag = False
    if d[W[i]] >= 1:
        flag = False
    d[W[i]] += 1
print(("Yes" if flag else "No"))

import sys

stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
ni = lambda: int(ns())
nin = lambda y: [ni() for _ in range(y)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda y: [na() for _ in range(y)]
nf = lambda: float(ns())
nfn = lambda y: [nf() for _ in range(y)]
nfa = lambda: list(map(float, stdin.readline().split()))
nfan = lambda y: [nfa() for _ in range(y)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda y: [ns() for _ in range(y)]
ncl = lambda y: [list(ns()) for _ in range(y)]
nas = lambda: stdin.readline().split()
n = ni()
w = nsn(n)
flag = True
dic = dict()
last = w[0][0]
for i in range(n):
    if dic.get(w[i], False):
        flag = False
    if last != w[i][0]:
        flag = False
    last = w[i][-1]
    dic[w[i]] = True
print(("Yes" if flag else "No"))

+nf = lambda: float(ns()) +nfn = lambda y: [nf() for _ in range(y)] +nfa = lambda: list(map(float, stdin.readline().split())) +nfan = lambda y: [nfa() for _ in range(y)] -from collections import defaultdict - -N = ni() -W = nsn(N) -d = defaultdict(int) +n = ni() +w = nsn(n) -for i in range(N): -    if i and W[i - 1][-1] != W[i][0]: +dic = dict() +last = w[0][0] +for i in range(n): +    if dic.get(w[i], False): -    if d[W[i]] >= 1: +    if last != w[i][0]: -    d[W[i]] += 1 +    last = w[i][-1] +    dic[w[i]] = True