import java.util.*;
class Main {
    public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
	HashSet<String> set = new HashSet<String>();
	String[] a = new String[n];
	for(int i = 0; i<n; i++) {
	    String str = sc.next();
	    set.add(str);
	    a[i] = str;
	    if(i!=0) {
		if(a[i].charAt(0) != a[i-1].charAt(a[i-1].length()-1)) {
			System.out.println("No");
			return;
		    }
		}
	}
	if(set.size()!=n) {
	    System.out.println("No");
	    return;
	}
	System.out.println("Yes");

    }
} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
	HashSet<String> set = new HashSet<String>();
	String[] a = new String[n];
	for(int i = 0; i<n; i++) {
	    String str = sc.next();
	    set.add(str);
	    a[i] = str;
	    if(i!=0) {
		if(a[i].charAt(0) != a[i-1].charAt(a[i-1].length()-1)) {
			System.out.println("No");
			return;
		    }
		}
	}
	if(set.size()!=n) {
	    System.out.println("No");
	    return;
	}
	System.out.println("Yes");

    }
} Main public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
	HashSet<String> set = new HashSet<String>();
	String[] a = new String[n];
	for(int i = 0; i<n; i++) {
	    String str = sc.next();
	    set.add(str);
	    a[i] = str;
	    if(i!=0) {
		if(a[i].charAt(0) != a[i-1].charAt(a[i-1].length()-1)) {
			System.out.println("No");
			return;
		    }
		}
	}
	if(set.size()!=n) {
	    System.out.println("No");
	    return;
	}
	System.out.println("Yes");

    } main {
	Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
	HashSet<String> set = new HashSet<String>();
	String[] a = new String[n];
	for(int i = 0; i<n; i++) {
	    String str = sc.next();
	    set.add(str);
	    a[i] = str;
	    if(i!=0) {
		if(a[i].charAt(0) != a[i-1].charAt(a[i-1].length()-1)) {
			System.out.println("No");
			return;
		    }
		}
	}
	if(set.size()!=n) {
	    System.out.println("No");
	    return;
	}
	System.out.println("Yes");

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc HashSet<String> set = new HashSet<String>(); set new HashSet<String>() String[] a = new String[n]; a new String[n] n for(int i = 0; i<n; i++) {
	    String str = sc.next();
	    set.add(str);
	    a[i] = str;
	    if(i!=0) {
		if(a[i].charAt(0) != a[i-1].charAt(a[i-1].length()-1)) {
			System.out.println("No");
			return;
		    }
		}
	} int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
	    String str = sc.next();
	    set.add(str);
	    a[i] = str;
	    if(i!=0) {
		if(a[i].charAt(0) != a[i-1].charAt(a[i-1].length()-1)) {
			System.out.println("No");
			return;
		    }
		}
	} {
	    String str = sc.next();
	    set.add(str);
	    a[i] = str;
	    if(i!=0) {
		if(a[i].charAt(0) != a[i-1].charAt(a[i-1].length()-1)) {
			System.out.println("No");
			return;
		    }
		}
	} String str = sc.next(); str sc.next() sc.next sc set.add(str) set.add set str a[i] = str a[i] a i str if(i!=0) {
		if(a[i].charAt(0) != a[i-1].charAt(a[i-1].length()-1)) {
			System.out.println("No");
			return;
		    }
		} i!=0 i 0 {
		if(a[i].charAt(0) != a[i-1].charAt(a[i-1].length()-1)) {
			System.out.println("No");
			return;
		    }
		} if(a[i].charAt(0) != a[i-1].charAt(a[i-1].length()-1)) {
			System.out.println("No");
			return;
		    } a[i].charAt(0) != a[i-1].charAt(a[i-1].length()-1) a[i].charAt(0) a[i].charAt a[i] a i 0 a[i-1].charAt(a[i-1].length()-1) a[i-1].charAt a[i-1] a i-1 i 1 a[i-1].length()-1 a[i-1].length() a[i-1].length a[i-1] a i-1 i 1 1 {
			System.out.println("No");
			return;
		    } System.out.println("No") System.out.println System.out System System.out "No" return; if(set.size()!=n) {
	    System.out.println("No");
	    return;
	} set.size()!=n set.size() set.size set n {
	    System.out.println("No");
	    return;
	} System.out.println("No") System.out.println System.out System System.out "No" return; System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args
import java.util.*;
class Main {
    public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
	HashSet<String> set = new HashSet<String>();
	String[] a = new String[n];
	for(int i = 0; i<n; i++) {
	    String str = sc.next();
	    set.add(str);
	    a[i] = str;
	    if(i!=0) {
		if(a[i].charAt(0) != a[i-1].charAt(a[i-1].length()-1)) {
			System.out.println("No");
			return;
		    }
		}
	}
	if(set.size()!=n) {
	    System.out.println("No");
	    return;
	}
	System.out.println("Yes");

    }
}