import Control.Monad
import Data.List

isUniq :: Int -> [String] -> Bool
isUniq n w
  | n == length (nub w) = True
  | otherwise = False
  
isSiritori :: [String] -> Bool
isSiritori [_] = True
isSiritori (w0:w1:ws)
  | last w0 == head w1 = isSiritori (w1:ws)
  | otherwise = False

main = do
  n <- readLn
  w <- replicateM n getLine
  let ans = if(isUniq n w && isSiritori w)
            then "Yes"
            else "No"
  putStrLn ans
  