import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String[] array=new String[n];
		String buff1="",buff2="";

		for(int i=0;i<n;i++) {
			array[i]=sc.next();
		}
		for(int i=0;i<n-1;i++) {
			for(int j=i+1;j<n;j++) {
				if(array[i].equals(array[j])) {
					System.out.println("No");
					System.exit(0);
				}
			}
		}
		for(int i=0;i<n-1;i++) {
			buff1=array[i].substring(array[i].length()-1,array[i].length());
			buff2=array[i+1].substring(0,1);
			if(!buff1.equals(buff2)) {
				System.out.println("No");
				System.exit(0);
			}
		}

		System.out.println("Yes");
	}
}

 import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String[] array=new String[n];
		String buff1="",buff2="";

		for(int i=0;i<n;i++) {
			array[i]=sc.next();
		}
		for(int i=0;i<n-1;i++) {
			for(int j=i+1;j<n;j++) {
				if(array[i].equals(array[j])) {
					System.out.println("No");
					System.exit(0);
				}
			}
		}
		for(int i=0;i<n-1;i++) {
			buff1=array[i].substring(array[i].length()-1,array[i].length());
			buff2=array[i+1].substring(0,1);
			if(!buff1.equals(buff2)) {
				System.out.println("No");
				System.exit(0);
			}
		}

		System.out.println("Yes");
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String[] array=new String[n];
		String buff1="",buff2="";

		for(int i=0;i<n;i++) {
			array[i]=sc.next();
		}
		for(int i=0;i<n-1;i++) {
			for(int j=i+1;j<n;j++) {
				if(array[i].equals(array[j])) {
					System.out.println("No");
					System.exit(0);
				}
			}
		}
		for(int i=0;i<n-1;i++) {
			buff1=array[i].substring(array[i].length()-1,array[i].length());
			buff2=array[i+1].substring(0,1);
			if(!buff1.equals(buff2)) {
				System.out.println("No");
				System.exit(0);
			}
		}

		System.out.println("Yes");
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String[] array=new String[n];
		String buff1="",buff2="";

		for(int i=0;i<n;i++) {
			array[i]=sc.next();
		}
		for(int i=0;i<n-1;i++) {
			for(int j=i+1;j<n;j++) {
				if(array[i].equals(array[j])) {
					System.out.println("No");
					System.exit(0);
				}
			}
		}
		for(int i=0;i<n-1;i++) {
			buff1=array[i].substring(array[i].length()-1,array[i].length());
			buff2=array[i+1].substring(0,1);
			if(!buff1.equals(buff2)) {
				System.out.println("No");
				System.exit(0);
			}
		}

		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 String[] array=new String[n]; array new String[n] n String buff1="" buff1 "" buff2=""; buff2 "" for(int i=0;i<n;i++) {
			array[i]=sc.next();
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			array[i]=sc.next();
		} {
			array[i]=sc.next();
		} array[i]=sc.next() array[i] array i sc.next() sc.next sc for(int i=0;i<n-1;i++) {
			for(int j=i+1;j<n;j++) {
				if(array[i].equals(array[j])) {
					System.out.println("No");
					System.exit(0);
				}
			}
		} int i=0; int i=0; i 0 i<n-1 i n-1 n 1 i++ i++ i {
			for(int j=i+1;j<n;j++) {
				if(array[i].equals(array[j])) {
					System.out.println("No");
					System.exit(0);
				}
			}
		} {
			for(int j=i+1;j<n;j++) {
				if(array[i].equals(array[j])) {
					System.out.println("No");
					System.exit(0);
				}
			}
		} for(int j=i+1;j<n;j++) {
				if(array[i].equals(array[j])) {
					System.out.println("No");
					System.exit(0);
				}
			} int j=i+1; int j=i+1; j i+1 i 1 j<n j n j++ j++ j {
				if(array[i].equals(array[j])) {
					System.out.println("No");
					System.exit(0);
				}
			} {
				if(array[i].equals(array[j])) {
					System.out.println("No");
					System.exit(0);
				}
			} if(array[i].equals(array[j])) {
					System.out.println("No");
					System.exit(0);
				} array[i].equals(array[j]) array[i].equals array[i] array i array[j] array j {
					System.out.println("No");
					System.exit(0);
				} System.out.println("No") System.out.println System.out System System.out "No" System.exit(0) System.exit System 0 for(int i=0;i<n-1;i++) {
			buff1=array[i].substring(array[i].length()-1,array[i].length());
			buff2=array[i+1].substring(0,1);
			if(!buff1.equals(buff2)) {
				System.out.println("No");
				System.exit(0);
			}
		} int i=0; int i=0; i 0 i<n-1 i n-1 n 1 i++ i++ i {
			buff1=array[i].substring(array[i].length()-1,array[i].length());
			buff2=array[i+1].substring(0,1);
			if(!buff1.equals(buff2)) {
				System.out.println("No");
				System.exit(0);
			}
		} {
			buff1=array[i].substring(array[i].length()-1,array[i].length());
			buff2=array[i+1].substring(0,1);
			if(!buff1.equals(buff2)) {
				System.out.println("No");
				System.exit(0);
			}
		} buff1=array[i].substring(array[i].length()-1,array[i].length()) buff1 array[i].substring(array[i].length()-1,array[i].length()) array[i].substring array[i] array i array[i].length()-1 array[i].length() array[i].length array[i] array i 1 array[i].length() array[i].length array[i] array i buff2=array[i+1].substring(0,1) buff2 array[i+1].substring(0,1) array[i+1].substring array[i+1] array i+1 i 1 0 1 if(!buff1.equals(buff2)) {
				System.out.println("No");
				System.exit(0);
			} !buff1.equals(buff2) buff1.equals(buff2) buff1.equals buff1 buff2 {
				System.out.println("No");
				System.exit(0);
			} System.out.println("No") System.out.println System.out System System.out "No" System.exit(0) System.exit System 0 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();
		String[] array=new String[n];
		String buff1="",buff2="";

		for(int i=0;i<n;i++) {
			array[i]=sc.next();
		}
		for(int i=0;i<n-1;i++) {
			for(int j=i+1;j<n;j++) {
				if(array[i].equals(array[j])) {
					System.out.println("No");
					System.exit(0);
				}
			}
		}
		for(int i=0;i<n-1;i++) {
			buff1=array[i].substring(array[i].length()-1,array[i].length());
			buff2=array[i+1].substring(0,1);
			if(!buff1.equals(buff2)) {
				System.out.println("No");
				System.exit(0);
			}
		}

		System.out.println("Yes");
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String[] array=new String[n];
		String buff1="",buff2="";

		for(int i=0;i<n;i++) {
			array[i]=sc.next();
		}
		for(int i=0;i<n-1;i++) {
			for(int j=i+1;j<n;j++) {
				if(array[i].equals(array[j])) {
					System.out.println("No");
					System.exit(0);
				}
			}
		}
		for(int i=0;i<n-1;i++) {
			buff1=array[i].substring(array[i].length()-1,array[i].length());
			buff2=array[i+1].substring(0,1);
			if(!buff1.equals(buff2)) {
				System.out.println("No");
				System.exit(0);
			}
		}

		System.out.println("Yes");
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String[] array=new String[n];
		String buff1="",buff2="";

		for(int i=0;i<n;i++) {
			array[i]=sc.next();
		}
		for(int i=0;i<n-1;i++) {
			for(int j=i+1;j<n;j++) {
				if(array[i].equals(array[j])) {
					System.out.println("No");
					System.exit(0);
				}
			}
		}
		for(int i=0;i<n-1;i++) {
			buff1=array[i].substring(array[i].length()-1,array[i].length());
			buff2=array[i+1].substring(0,1);
			if(!buff1.equals(buff2)) {
				System.out.println("No");
				System.exit(0);
			}
		}

		System.out.println("Yes");
	}
}


