import Control.Monad (replicateM)
main :: IO ()
main = do
    n <- readLn
    ws <- replicateM n getLine
    case nodup ws of
        True -> putStrLn "Yes"
        False -> putStrLn "No"

nodup [] = True
nodup (a:[]) = True
nodup (a:b:c) = (last a) == (head b) && (notElem a (b:c)) && nodup (b:c)