#include "bits/stdc++.h"
using namespace std;

int main() {
    int n;
    scanf("%d", &n);
    set< string> st;
    string a, b;
    for(int i = 0; i < n; ++i) {
        cin >> a;
        if(i) {
            if(st.count(a)) return !printf("No\n");
            if(b.back() != a[0]) return !printf("No\n");
        }
        b = a;
        st.emplace(a);
    }
    puts("Yes");
}