import Data.List

main :: IO ()
main = do
  getLine
  ws <- lines <$> getContents
  if all (==1) $ map length $ group $ sort ws
     then putStrLn $ srtr ws
     else putStrLn "No"
  
srtr :: [String] -> String
srtr  [] = "Yes"
srtr  [_] = "Yes"
srtr (x:y:xs)
  | last x == head y = srtr (y:xs)
  | otherwise = "No"