import Control.Monad                                                                                                       
                                                                                                                           
main :: IO ()                                                                                                              
main = do                                                                                                                  
  n <- read <$> getLine                                                                                                    
  ws <- replicateM n getLine                                                                                               
                                                                                                                           
  if (all id . map shiritori) $ zip ws (tail ws)                                                                           
    then putStrLn "Yes"                                                                                                    
    else putStrLn "No"                                                                                                     
                                                                                                                           
shiritori :: (String, String) -> Bool                                                                                      
shiritori (a, b)                                                                                                           
  | last a == head b = True                                                                                                
  | otherwise        = False  