import java.util.*;
public class Main {

	public static void main(String[] args) {
		ArrayList array = new ArrayList();
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		boolean ans = true;
		String w=sc.next();
		array.add(w);
		for(int i=0; i<a-1; i++) {
			String w2=sc.next();		
			if(array.contains(w2)) {
				ans = false;
			}
			if(w.charAt(w.length()-1)!= w2.charAt(0)) {
				ans = false;
			}
			array.add(w2);
			w=w2;
		}
		if(ans) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}

} import java.util.*; util.* java public class Main {

	public static void main(String[] args) {
		ArrayList array = new ArrayList();
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		boolean ans = true;
		String w=sc.next();
		array.add(w);
		for(int i=0; i<a-1; i++) {
			String w2=sc.next();		
			if(array.contains(w2)) {
				ans = false;
			}
			if(w.charAt(w.length()-1)!= w2.charAt(0)) {
				ans = false;
			}
			array.add(w2);
			w=w2;
		}
		if(ans) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}

} Main public static void main(String[] args) {
		ArrayList array = new ArrayList();
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		boolean ans = true;
		String w=sc.next();
		array.add(w);
		for(int i=0; i<a-1; i++) {
			String w2=sc.next();		
			if(array.contains(w2)) {
				ans = false;
			}
			if(w.charAt(w.length()-1)!= w2.charAt(0)) {
				ans = false;
			}
			array.add(w2);
			w=w2;
		}
		if(ans) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	} main {
		ArrayList array = new ArrayList();
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		boolean ans = true;
		String w=sc.next();
		array.add(w);
		for(int i=0; i<a-1; i++) {
			String w2=sc.next();		
			if(array.contains(w2)) {
				ans = false;
			}
			if(w.charAt(w.length()-1)!= w2.charAt(0)) {
				ans = false;
			}
			array.add(w2);
			w=w2;
		}
		if(ans) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	} ArrayList array = new ArrayList(); array new ArrayList() Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc boolean ans = true; ans true String w=sc.next(); w sc.next() sc.next sc array.add(w) array.add array w for(int i=0; i<a-1; i++) {
			String w2=sc.next();		
			if(array.contains(w2)) {
				ans = false;
			}
			if(w.charAt(w.length()-1)!= w2.charAt(0)) {
				ans = false;
			}
			array.add(w2);
			w=w2;
		} int i=0; int i=0; i 0 i<a-1 i a-1 a 1 i++ i++ i {
			String w2=sc.next();		
			if(array.contains(w2)) {
				ans = false;
			}
			if(w.charAt(w.length()-1)!= w2.charAt(0)) {
				ans = false;
			}
			array.add(w2);
			w=w2;
		} {
			String w2=sc.next();		
			if(array.contains(w2)) {
				ans = false;
			}
			if(w.charAt(w.length()-1)!= w2.charAt(0)) {
				ans = false;
			}
			array.add(w2);
			w=w2;
		} String w2=sc.next(); w2 sc.next() sc.next sc if(array.contains(w2)) {
				ans = false;
			} array.contains(w2) array.contains array w2 {
				ans = false;
			} ans = false ans false if(w.charAt(w.length()-1)!= w2.charAt(0)) {
				ans = false;
			} w.charAt(w.length()-1)!= w2.charAt(0) w.charAt(w.length()-1) w.charAt w w.length()-1 w.length() w.length w 1 w2.charAt(0) w2.charAt w2 0 {
				ans = false;
			} ans = false ans false array.add(w2) array.add array w2 w=w2 w w2 if(ans) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		} ans {
			System.out.println("Yes");
		} System.out.println("Yes") System.out.println System.out System System.out "Yes" {
			System.out.println("No");
		} System.out.println("No") System.out.println System.out System System.out "No" String[] args args public class Main {

	public static void main(String[] args) {
		ArrayList array = new ArrayList();
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		boolean ans = true;
		String w=sc.next();
		array.add(w);
		for(int i=0; i<a-1; i++) {
			String w2=sc.next();		
			if(array.contains(w2)) {
				ans = false;
			}
			if(w.charAt(w.length()-1)!= w2.charAt(0)) {
				ans = false;
			}
			array.add(w2);
			w=w2;
		}
		if(ans) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}

} public class Main {

	public static void main(String[] args) {
		ArrayList array = new ArrayList();
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		boolean ans = true;
		String w=sc.next();
		array.add(w);
		for(int i=0; i<a-1; i++) {
			String w2=sc.next();		
			if(array.contains(w2)) {
				ans = false;
			}
			if(w.charAt(w.length()-1)!= w2.charAt(0)) {
				ans = false;
			}
			array.add(w2);
			w=w2;
		}
		if(ans) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}

} Main
import java.util.*;
public class Main {

	public static void main(String[] args) {
		ArrayList array = new ArrayList();
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		boolean ans = true;
		String w=sc.next();
		array.add(w);
		for(int i=0; i<a-1; i++) {
			String w2=sc.next();		
			if(array.contains(w2)) {
				ans = false;
			}
			if(w.charAt(w.length()-1)!= w2.charAt(0)) {
				ans = false;
			}
			array.add(w2);
			w=w2;
		}
		if(ans) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}

}