import Data.List 
import Control.Monad

main :: IO ()
main = do
    n <- readLn :: IO Int
    w <- replicateM n getLine :: IO [String]
    putStrLn $ if isNotDeplicated w && areMatched w then "Yes" else "No"
              
isNotDeplicated :: Ord a => [a] -> Bool
isNotDeplicated = and . map (== 1) . map length . group . sort

areMatched :: [String] -> Bool
areMatched [_] = True
areMatched (a:b:xs) = isMatched a b && areMatched (b:xs)
  where 
    isMatched f s = last f == head s