module Main where

import Control.Applicative
import Control.Monad
import Data.List

main :: IO ()
main = do
    n <- readLn
    ws <- replicateM n getLine
    let f (as, bss) =
            if (last as == (head $ head bss)) && as `notElem` bss
            then True
            else False
    let p = all f (zip ws (init . tail $ tails ws))
    if p
        then putStrLn "Yes"
        else putStrLn "No"