program A319A
    implicit none
    integer(8)::N,i,j,flg,ac
    character(10)::wi
    character(10),dimension(100)::W
    read*,N
    ac=1
    flg=0
    do i=1,N
        read*,wi
        if(i==1)then
            W(ac)=wi
            ac=ac+1
        else if(wi(1:1)==W(ac-1)(len_trim(W(ac-1)):len_trim(W((ac-1)))))then
            do j=1,ac-1
                if(wi(1:len_trim(wi))==W(j)(1:len_trim(W(j))))then
                    flg=1
                    exit
                end if
            end do
            if(flg==0)then
                W(ac)=wi
                ac=ac+1
            end if
        else
            flg=1
        end if
        !print'(i0)',flg
    end do
    if(flg==0)print'(A)',"Yes"
    if(flg==1)print'(A)',"No"
end program A319A