Imports System

Module Main
    Sub Main(args As String())
        Dim n As Integer = Console.ReadLine
        Dim words(n - 1) As String
        words(0) = Console.ReadLine
        Dim ans As String = "Yes"
        Dim i As Integer
        Dim str As String

        For i = 1 To n - 1
            str = Console.ReadLine
            '重複していなければ配列に入れる
            Dim test As Integer = Array.IndexOf(words, str)
            If test = -1 Then
                words(i) = str
                '現在行の単語の最後の一文字と、前の単語の最後の一文字が同じかどうか
                If Not words(i).Substring(0, 1).Equals(words(i - 1).Substring(words(i - 1).Length - 1, 1)) Then
                    ans = "No"
                    Exit For
                End If
            Else
                ans = "No"
                Exit For
            End If
        Next
        Console.WriteLine(ans)
        Console.ReadKey(True)
    End Sub
End Module
