import Control.Monad
import Data.Set

f :: [String] -> Bool
f [] = True
f [w] = True
f (w0:w1:ws)
  | last w0 == head w1 = f (w1:ws)
  | otherwise = False

main = do
  n <- readLn
  w <- replicateM n getLine
  putStrLn $ if f w && size (fromList w) == n then "Yes" else "No"