import Data.Set as Set

main = do
    n <- readLn :: IO Int
    w <- getLine
    r <- loop (n-1) w (insert w empty)
    if r then putStrLn "Yes" else putStrLn "No"

loop :: Int -> String -> Set String -> IO Bool
loop 0 _ _ = return True
loop n ac set = do
    w <- getLine
    if feql ac w && w `notMember` set
        then loop (n-1) w (insert w set)
        else loop' (n-1)

loop' 0 = return False
loop' n = do
    _ <- getLine
    loop' (n-1)


feql :: String -> String -> Bool
feql q w = last q == head w