program shiritori
  implicit none
  integer :: n, i, j
  character(10) :: w(100)
  read(*,*) n
  do i = 1, n
    read(*,*) w(i)
    do j = 1, i-1
      if (w(j) == w(i)) then
        write(*,'(a)') "No"
        stop
      end if
    end do
  end do
  do i = 2, n
    if (w(i)(1:1) == w(i-1)(len_trim(w(i-1)):len_trim(w(i-1)))) cycle
    write(*,'(a)') "No"
    stop
  end do
  write(*,'(a)') "Yes"
end program shiritori