let n = Int(readLine()!)!
var words: [String] = []
var ok = true
for _ in 0..<n { words.append(readLine()!) }
for i in 0..<n-1 {
  let endIndex = words[i].index(before: words[i].endIndex)
  let end = words[i][endIndex]
  let start = words[i+1][words[i+1].startIndex]
  ok = (end == start && ok)
}
if Set(words).count == words.count && ok {
  print("Yes")
} else {
  print("No")
}