import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		int a=scan.nextInt();
		String str[]=new String[a];
		for(int i=0;i!=a;i++) {
			str[i]=scan.next();
		}
		String ans="";
		int count=0;
		for(int i=0;i!=a;i++) {
			for(int j=0;j!=i;j++) {
				if(str[i].equals(str[j])) {
					count=1;
				}
			}
			if(i==a-1) {
				break;
			}
			if(str[i].charAt(str[i].length()-1)==str[i+1].charAt(0)) {
				
			}
			else {
				count=1;
			}
		}
		if(count==1) {
			System.out.println("No");
		}
		else {
			System.out.println("Yes");
		}
		}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		int a=scan.nextInt();
		String str[]=new String[a];
		for(int i=0;i!=a;i++) {
			str[i]=scan.next();
		}
		String ans="";
		int count=0;
		for(int i=0;i!=a;i++) {
			for(int j=0;j!=i;j++) {
				if(str[i].equals(str[j])) {
					count=1;
				}
			}
			if(i==a-1) {
				break;
			}
			if(str[i].charAt(str[i].length()-1)==str[i+1].charAt(0)) {
				
			}
			else {
				count=1;
			}
		}
		if(count==1) {
			System.out.println("No");
		}
		else {
			System.out.println("Yes");
		}
		}
} Main public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		int a=scan.nextInt();
		String str[]=new String[a];
		for(int i=0;i!=a;i++) {
			str[i]=scan.next();
		}
		String ans="";
		int count=0;
		for(int i=0;i!=a;i++) {
			for(int j=0;j!=i;j++) {
				if(str[i].equals(str[j])) {
					count=1;
				}
			}
			if(i==a-1) {
				break;
			}
			if(str[i].charAt(str[i].length()-1)==str[i+1].charAt(0)) {
				
			}
			else {
				count=1;
			}
		}
		if(count==1) {
			System.out.println("No");
		}
		else {
			System.out.println("Yes");
		}
		} main {
		Scanner scan=new Scanner(System.in);
		int a=scan.nextInt();
		String str[]=new String[a];
		for(int i=0;i!=a;i++) {
			str[i]=scan.next();
		}
		String ans="";
		int count=0;
		for(int i=0;i!=a;i++) {
			for(int j=0;j!=i;j++) {
				if(str[i].equals(str[j])) {
					count=1;
				}
			}
			if(i==a-1) {
				break;
			}
			if(str[i].charAt(str[i].length()-1)==str[i+1].charAt(0)) {
				
			}
			else {
				count=1;
			}
		}
		if(count==1) {
			System.out.println("No");
		}
		else {
			System.out.println("Yes");
		}
		} Scanner scan=new Scanner(System.in); scan new Scanner(System.in) int a=scan.nextInt(); a scan.nextInt() scan.nextInt scan String str[]=new String[a]; str new String[a] a for(int i=0;i!=a;i++) {
			str[i]=scan.next();
		} int i=0; int i=0; i 0 i!=a i a i++ i++ i {
			str[i]=scan.next();
		} {
			str[i]=scan.next();
		} str[i]=scan.next() str[i] str i scan.next() scan.next scan String ans=""; ans "" int count=0; count 0 for(int i=0;i!=a;i++) {
			for(int j=0;j!=i;j++) {
				if(str[i].equals(str[j])) {
					count=1;
				}
			}
			if(i==a-1) {
				break;
			}
			if(str[i].charAt(str[i].length()-1)==str[i+1].charAt(0)) {
				
			}
			else {
				count=1;
			}
		} int i=0; int i=0; i 0 i!=a i a i++ i++ i {
			for(int j=0;j!=i;j++) {
				if(str[i].equals(str[j])) {
					count=1;
				}
			}
			if(i==a-1) {
				break;
			}
			if(str[i].charAt(str[i].length()-1)==str[i+1].charAt(0)) {
				
			}
			else {
				count=1;
			}
		} {
			for(int j=0;j!=i;j++) {
				if(str[i].equals(str[j])) {
					count=1;
				}
			}
			if(i==a-1) {
				break;
			}
			if(str[i].charAt(str[i].length()-1)==str[i+1].charAt(0)) {
				
			}
			else {
				count=1;
			}
		} for(int j=0;j!=i;j++) {
				if(str[i].equals(str[j])) {
					count=1;
				}
			} int j=0; int j=0; j 0 j!=i j i j++ j++ j {
				if(str[i].equals(str[j])) {
					count=1;
				}
			} {
				if(str[i].equals(str[j])) {
					count=1;
				}
			} if(str[i].equals(str[j])) {
					count=1;
				} str[i].equals(str[j]) str[i].equals str[i] str i str[j] str j {
					count=1;
				} count=1 count 1 if(i==a-1) {
				break;
			} i==a-1 i a-1 a 1 {
				break;
			} break; if(str[i].charAt(str[i].length()-1)==str[i+1].charAt(0)) {
				
			}
			else {
				count=1;
			} str[i].charAt(str[i].length()-1)==str[i+1].charAt(0) str[i].charAt(str[i].length()-1) str[i].charAt str[i] str i str[i].length()-1 str[i].length() str[i].length str[i] str i 1 str[i+1].charAt(0) str[i+1].charAt str[i+1] str i+1 i 1 0 {
				
			} {
				count=1;
			} count=1 count 1 if(count==1) {
			System.out.println("No");
		}
		else {
			System.out.println("Yes");
		} count==1 count 1 {
			System.out.println("No");
		} System.out.println("No") System.out.println System.out System System.out "No" {
			System.out.println("Yes");
		} 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 scan=new Scanner(System.in);
		int a=scan.nextInt();
		String str[]=new String[a];
		for(int i=0;i!=a;i++) {
			str[i]=scan.next();
		}
		String ans="";
		int count=0;
		for(int i=0;i!=a;i++) {
			for(int j=0;j!=i;j++) {
				if(str[i].equals(str[j])) {
					count=1;
				}
			}
			if(i==a-1) {
				break;
			}
			if(str[i].charAt(str[i].length()-1)==str[i+1].charAt(0)) {
				
			}
			else {
				count=1;
			}
		}
		if(count==1) {
			System.out.println("No");
		}
		else {
			System.out.println("Yes");
		}
		}
} public class Main {
	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		int a=scan.nextInt();
		String str[]=new String[a];
		for(int i=0;i!=a;i++) {
			str[i]=scan.next();
		}
		String ans="";
		int count=0;
		for(int i=0;i!=a;i++) {
			for(int j=0;j!=i;j++) {
				if(str[i].equals(str[j])) {
					count=1;
				}
			}
			if(i==a-1) {
				break;
			}
			if(str[i].charAt(str[i].length()-1)==str[i+1].charAt(0)) {
				
			}
			else {
				count=1;
			}
		}
		if(count==1) {
			System.out.println("No");
		}
		else {
			System.out.println("Yes");
		}
		}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		int a=scan.nextInt();
		String str[]=new String[a];
		for(int i=0;i!=a;i++) {
			str[i]=scan.next();
		}
		String ans="";
		int count=0;
		for(int i=0;i!=a;i++) {
			for(int j=0;j!=i;j++) {
				if(str[i].equals(str[j])) {
					count=1;
				}
			}
			if(i==a-1) {
				break;
			}
			if(str[i].charAt(str[i].length()-1)==str[i+1].charAt(0)) {
				
			}
			else {
				count=1;
			}
		}
		if(count==1) {
			System.out.println("No");
		}
		else {
			System.out.println("Yes");
		}
		}
}