let rec for_fold a b v f = if a >= b then v else for_fold (a+1) b (f v a) f
let () = print_endline @@
  Scanf.scanf "%d" @@ fun n ->
  let w = Array.init n (fun _ -> Scanf.scanf " %s" (fun x -> x)) in
  let c = Array.to_list w |> List.sort_uniq compare |> List.length in
  let b = 
    for_fold 0 (n-1) true (fun b i ->
      b && (w.(i).[String.length w.(i) - 1] = w.(i+1).[0]))
  in
  if b && c = n then "Yes" else "No"