let () =
  Scanf.scanf "%d\n" @@ fun n ->
  let rec inner (dict : string list) (i : int) =
    match (i < n) with
    | false -> true
    | true ->
      Scanf.scanf "%s\n" (fun str ->
          (match dict with
           | [] -> inner [str] (i + 1)
           | x :: xl -> (match (x.[(String.length x) - 1]) = str.[0] with
               | false -> false
               | true  -> (match (List.mem str dict) with
                   | true -> false
                   | false -> inner (str :: dict) (i + 1)))))
  in
  match inner [] 0 with
  | true -> print_endline "Yes"
  | false -> print_endline "No"