import Control.Monad

main :: IO ()
main = do
	n <- readLn
	xs <- replicateM n getLine
	putStrLn $ if shiritori xs then "Yes" else "No"

shiritori :: [String] -> Bool
shiritori [x] = True
shiritori (x:xs) = (last x == (head $ head xs)) && (shiritori xs)
