object Main {
  def main(args: Array[String]): Unit = {
    val n = io.StdIn.readInt()
    val words = for( _ <- (1 to n).toList) yield io.StdIn.readLine()
    val result = check (words) match {
      case Right(_) => "yes"
      case Left(_) => "no"
    }

    println(result)
  }


  def check(words: List[String]): Either[Unit, Unit] = {
    def loop(words: List[String], used: List[String] = Nil): Either[Unit, Unit] = {
      words match {
        case Nil => Right()
        case x::xs =>
          if (used.isEmpty) loop(xs, x :: used)
          else if (x.head != used.head.last) Left()
          else if(used.contains(x)) Left()
          else loop(xs, x::used)
      }
    }

    loop(words)
  }
}
