N = tonumber(io.read())

WU = {}

pW = io.read()
WU[pW] = true

ans = "Yes"

for v = 2, N do
  Wx = io.read()

  if WU[Wx] or string.match(string.reverse(pW), "%a") ~= string.match(Wx, "%a") then
    ans = "No"
    break
  end
  
  WU[Wx] = true

  pW = Wx

end

print(ans)