import java.util.*;
 
public class Main {
 	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		ArrayList<String> W = new ArrayList<String>();

		for(int i=0; i<N; i++){
			String w = sc.next();
			if(i>0){
				if(W.contains(w)){
					System.out.println("No");
					return;
				}
				String str1 = w.substring(0,1);
				String str2 = W.get(i-1).substring(W.get(i-1).length()-1);
				if(!(str1.equals(str2))){
					System.out.println("No");
					return;
				}
			}
			W.add(w);
		}
		System.out.println("Yes");
	}
} import java.util.*; util.* java public class Main {
 	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		ArrayList<String> W = new ArrayList<String>();

		for(int i=0; i<N; i++){
			String w = sc.next();
			if(i>0){
				if(W.contains(w)){
					System.out.println("No");
					return;
				}
				String str1 = w.substring(0,1);
				String str2 = W.get(i-1).substring(W.get(i-1).length()-1);
				if(!(str1.equals(str2))){
					System.out.println("No");
					return;
				}
			}
			W.add(w);
		}
		System.out.println("Yes");
	}
} Main public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		ArrayList<String> W = new ArrayList<String>();

		for(int i=0; i<N; i++){
			String w = sc.next();
			if(i>0){
				if(W.contains(w)){
					System.out.println("No");
					return;
				}
				String str1 = w.substring(0,1);
				String str2 = W.get(i-1).substring(W.get(i-1).length()-1);
				if(!(str1.equals(str2))){
					System.out.println("No");
					return;
				}
			}
			W.add(w);
		}
		System.out.println("Yes");
	} main {
    	Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		ArrayList<String> W = new ArrayList<String>();

		for(int i=0; i<N; i++){
			String w = sc.next();
			if(i>0){
				if(W.contains(w)){
					System.out.println("No");
					return;
				}
				String str1 = w.substring(0,1);
				String str2 = W.get(i-1).substring(W.get(i-1).length()-1);
				if(!(str1.equals(str2))){
					System.out.println("No");
					return;
				}
			}
			W.add(w);
		}
		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 ArrayList<String> W = new ArrayList<String>(); W new ArrayList<String>() for(int i=0; i<N; i++){
			String w = sc.next();
			if(i>0){
				if(W.contains(w)){
					System.out.println("No");
					return;
				}
				String str1 = w.substring(0,1);
				String str2 = W.get(i-1).substring(W.get(i-1).length()-1);
				if(!(str1.equals(str2))){
					System.out.println("No");
					return;
				}
			}
			W.add(w);
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			String w = sc.next();
			if(i>0){
				if(W.contains(w)){
					System.out.println("No");
					return;
				}
				String str1 = w.substring(0,1);
				String str2 = W.get(i-1).substring(W.get(i-1).length()-1);
				if(!(str1.equals(str2))){
					System.out.println("No");
					return;
				}
			}
			W.add(w);
		} {
			String w = sc.next();
			if(i>0){
				if(W.contains(w)){
					System.out.println("No");
					return;
				}
				String str1 = w.substring(0,1);
				String str2 = W.get(i-1).substring(W.get(i-1).length()-1);
				if(!(str1.equals(str2))){
					System.out.println("No");
					return;
				}
			}
			W.add(w);
		} String w = sc.next(); w sc.next() sc.next sc if(i>0){
				if(W.contains(w)){
					System.out.println("No");
					return;
				}
				String str1 = w.substring(0,1);
				String str2 = W.get(i-1).substring(W.get(i-1).length()-1);
				if(!(str1.equals(str2))){
					System.out.println("No");
					return;
				}
			} i>0 i 0 {
				if(W.contains(w)){
					System.out.println("No");
					return;
				}
				String str1 = w.substring(0,1);
				String str2 = W.get(i-1).substring(W.get(i-1).length()-1);
				if(!(str1.equals(str2))){
					System.out.println("No");
					return;
				}
			} if(W.contains(w)){
					System.out.println("No");
					return;
				} W.contains(w) W.contains W w {
					System.out.println("No");
					return;
				} System.out.println("No") System.out.println System.out System System.out "No" return; String str1 = w.substring(0,1); str1 w.substring(0,1) w.substring w 0 1 String str2 = W.get(i-1).substring(W.get(i-1).length()-1); str2 W.get(i-1).substring(W.get(i-1).length()-1) W.get(i-1).substring W.get(i-1) W.get W i-1 i 1 W.get(i-1).length()-1 W.get(i-1).length() W.get(i-1).length W.get(i-1) W.get W i-1 i 1 1 if(!(str1.equals(str2))){
					System.out.println("No");
					return;
				} !(str1.equals(str2)) (str1.equals(str2)) str1.equals str1 str2 {
					System.out.println("No");
					return;
				} System.out.println("No") System.out.println System.out System System.out "No" return; W.add(w) W.add W w System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args public class Main {
 	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		ArrayList<String> W = new ArrayList<String>();

		for(int i=0; i<N; i++){
			String w = sc.next();
			if(i>0){
				if(W.contains(w)){
					System.out.println("No");
					return;
				}
				String str1 = w.substring(0,1);
				String str2 = W.get(i-1).substring(W.get(i-1).length()-1);
				if(!(str1.equals(str2))){
					System.out.println("No");
					return;
				}
			}
			W.add(w);
		}
		System.out.println("Yes");
	}
} public class Main {
 	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		ArrayList<String> W = new ArrayList<String>();

		for(int i=0; i<N; i++){
			String w = sc.next();
			if(i>0){
				if(W.contains(w)){
					System.out.println("No");
					return;
				}
				String str1 = w.substring(0,1);
				String str2 = W.get(i-1).substring(W.get(i-1).length()-1);
				if(!(str1.equals(str2))){
					System.out.println("No");
					return;
				}
			}
			W.add(w);
		}
		System.out.println("Yes");
	}
} Main
import java.util.*;
 
public class Main {
 	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		ArrayList<String> W = new ArrayList<String>();

		for(int i=0; i<N; i++){
			String w = sc.next();
			if(i>0){
				if(W.contains(w)){
					System.out.println("No");
					return;
				}
				String str1 = w.substring(0,1);
				String str2 = W.get(i-1).substring(W.get(i-1).length()-1);
				if(!(str1.equals(str2))){
					System.out.println("No");
					return;
				}
			}
			W.add(w);
		}
		System.out.println("Yes");
	}
}
