noOfWords= int(input())
words = []
satisfactor = True
for i in range(noOfWords):
    words.append(input())

if len(set(words)) < len(words):
    print("NO")    
    satisfactor = False 
else:
    for i in range(len(words)-1):
        if words[i][len(words[i])-1] ==  words[i+1][0]:
            continue
        else:
            satisfactor = False
            print("NO")
            break
if satisfactor :
    print("YES")            

