import Control.Monad (replicateM)
main :: IO ()
main = do
    n <- readLn
    replicateM n getLine >>= putStrLn . ($ "No") . ($ "Yes"). switch . nodup

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