import Control.Monad
import qualified Data.Set as S

data Status = Status {
  end :: Char,
  history :: S.Set String
} deriving Show

status :: String -> Status
status s = Status (last s) (S.singleton s)

game :: String -> Status -> Maybe Status
game "" _ = Nothing
game w (Status c h)
  | head w == c = if S.member w h
                  then Nothing
                  else Just $ Status (last w) (S.insert w h)
  | otherwise = Nothing

doGames :: [String] -> Maybe Status
doGames (s:ss) = foldr (\a b-> b >>= game a) (Just (status s)) $ reverse ss

main = do
  n <- read <$> getLine :: IO Int
  ws <- replicateM n getLine
  case doGames ws of
    Nothing -> putStrLn "No"
    otherwise -> putStrLn "Yes"
