import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		String[] str = new String[N];

		for(int i=0;i<N;i++){
			str[i]=sc.next();
		}
		
		boolean Flg = true;
		
		//重複チェック
		String hikaku ="";
		int cnt = 0;
		for(int i=0;i<N;i++) {
			hikaku = str[i];
			for(int j=0;j<N;j++) {
				if(str[j].equals(hikaku)) {
					cnt++;
				}
			}
		}
		//重複なし
		if(cnt==N) {
			String matubi = "";
			for(int i=0;i<N-1;i++) {
				matubi = String.valueOf(str[i].charAt(str[i].length()-1));
				if(!matubi.equals(String.valueOf(str[i+1].charAt(0)))) {
					Flg= false;
				}
			}
		}else {
			Flg=false;
		}
		
		if(Flg) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
		
		sc.close();
	}
} 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[] str = new String[N];

		for(int i=0;i<N;i++){
			str[i]=sc.next();
		}
		
		boolean Flg = true;
		
		//重複チェック
		String hikaku ="";
		int cnt = 0;
		for(int i=0;i<N;i++) {
			hikaku = str[i];
			for(int j=0;j<N;j++) {
				if(str[j].equals(hikaku)) {
					cnt++;
				}
			}
		}
		//重複なし
		if(cnt==N) {
			String matubi = "";
			for(int i=0;i<N-1;i++) {
				matubi = String.valueOf(str[i].charAt(str[i].length()-1));
				if(!matubi.equals(String.valueOf(str[i+1].charAt(0)))) {
					Flg= false;
				}
			}
		}else {
			Flg=false;
		}
		
		if(Flg) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
		
		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		String[] str = new String[N];

		for(int i=0;i<N;i++){
			str[i]=sc.next();
		}
		
		boolean Flg = true;
		
		//重複チェック
		String hikaku ="";
		int cnt = 0;
		for(int i=0;i<N;i++) {
			hikaku = str[i];
			for(int j=0;j<N;j++) {
				if(str[j].equals(hikaku)) {
					cnt++;
				}
			}
		}
		//重複なし
		if(cnt==N) {
			String matubi = "";
			for(int i=0;i<N-1;i++) {
				matubi = String.valueOf(str[i].charAt(str[i].length()-1));
				if(!matubi.equals(String.valueOf(str[i+1].charAt(0)))) {
					Flg= false;
				}
			}
		}else {
			Flg=false;
		}
		
		if(Flg) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
		
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		String[] str = new String[N];

		for(int i=0;i<N;i++){
			str[i]=sc.next();
		}
		
		boolean Flg = true;
		
		//重複チェック
		String hikaku ="";
		int cnt = 0;
		for(int i=0;i<N;i++) {
			hikaku = str[i];
			for(int j=0;j<N;j++) {
				if(str[j].equals(hikaku)) {
					cnt++;
				}
			}
		}
		//重複なし
		if(cnt==N) {
			String matubi = "";
			for(int i=0;i<N-1;i++) {
				matubi = String.valueOf(str[i].charAt(str[i].length()-1));
				if(!matubi.equals(String.valueOf(str[i+1].charAt(0)))) {
					Flg= false;
				}
			}
		}else {
			Flg=false;
		}
		
		if(Flg) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
		
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc String[] str = new String[N]; str new String[N] N for(int i=0;i<N;i++){
			str[i]=sc.next();
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			str[i]=sc.next();
		} {
			str[i]=sc.next();
		} str[i]=sc.next() str[i] str i sc.next() sc.next sc boolean Flg = true; Flg true String hikaku =""; hikaku "" int cnt = 0; cnt 0 for(int i=0;i<N;i++) {
			hikaku = str[i];
			for(int j=0;j<N;j++) {
				if(str[j].equals(hikaku)) {
					cnt++;
				}
			}
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			hikaku = str[i];
			for(int j=0;j<N;j++) {
				if(str[j].equals(hikaku)) {
					cnt++;
				}
			}
		} {
			hikaku = str[i];
			for(int j=0;j<N;j++) {
				if(str[j].equals(hikaku)) {
					cnt++;
				}
			}
		} hikaku = str[i] hikaku str[i] str i for(int j=0;j<N;j++) {
				if(str[j].equals(hikaku)) {
					cnt++;
				}
			} int j=0; int j=0; j 0 j<N j N j++ j++ j {
				if(str[j].equals(hikaku)) {
					cnt++;
				}
			} {
				if(str[j].equals(hikaku)) {
					cnt++;
				}
			} if(str[j].equals(hikaku)) {
					cnt++;
				} str[j].equals(hikaku) str[j].equals str[j] str j hikaku {
					cnt++;
				} cnt++ cnt if(cnt==N) {
			String matubi = "";
			for(int i=0;i<N-1;i++) {
				matubi = String.valueOf(str[i].charAt(str[i].length()-1));
				if(!matubi.equals(String.valueOf(str[i+1].charAt(0)))) {
					Flg= false;
				}
			}
		}else {
			Flg=false;
		} cnt==N cnt N {
			String matubi = "";
			for(int i=0;i<N-1;i++) {
				matubi = String.valueOf(str[i].charAt(str[i].length()-1));
				if(!matubi.equals(String.valueOf(str[i+1].charAt(0)))) {
					Flg= false;
				}
			}
		} String matubi = ""; matubi "" for(int i=0;i<N-1;i++) {
				matubi = String.valueOf(str[i].charAt(str[i].length()-1));
				if(!matubi.equals(String.valueOf(str[i+1].charAt(0)))) {
					Flg= false;
				}
			} int i=0; int i=0; i 0 i<N-1 i N-1 N 1 i++ i++ i {
				matubi = String.valueOf(str[i].charAt(str[i].length()-1));
				if(!matubi.equals(String.valueOf(str[i+1].charAt(0)))) {
					Flg= false;
				}
			} {
				matubi = String.valueOf(str[i].charAt(str[i].length()-1));
				if(!matubi.equals(String.valueOf(str[i+1].charAt(0)))) {
					Flg= false;
				}
			} matubi = String.valueOf(str[i].charAt(str[i].length()-1)) matubi String.valueOf(str[i].charAt(str[i].length()-1)) String.valueOf String 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 if(!matubi.equals(String.valueOf(str[i+1].charAt(0)))) {
					Flg= false;
				} !matubi.equals(String.valueOf(str[i+1].charAt(0))) matubi.equals(String.valueOf(str[i+1].charAt(0))) matubi.equals matubi String.valueOf(str[i+1].charAt(0)) String.valueOf String str[i+1].charAt(0) str[i+1].charAt str[i+1] str i+1 i 1 0 {
					Flg= false;
				} Flg= false Flg false {
			Flg=false;
		} Flg=false Flg false if(Flg) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		} Flg {
			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" sc.close() sc.close sc String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		String[] str = new String[N];

		for(int i=0;i<N;i++){
			str[i]=sc.next();
		}
		
		boolean Flg = true;
		
		//重複チェック
		String hikaku ="";
		int cnt = 0;
		for(int i=0;i<N;i++) {
			hikaku = str[i];
			for(int j=0;j<N;j++) {
				if(str[j].equals(hikaku)) {
					cnt++;
				}
			}
		}
		//重複なし
		if(cnt==N) {
			String matubi = "";
			for(int i=0;i<N-1;i++) {
				matubi = String.valueOf(str[i].charAt(str[i].length()-1));
				if(!matubi.equals(String.valueOf(str[i+1].charAt(0)))) {
					Flg= false;
				}
			}
		}else {
			Flg=false;
		}
		
		if(Flg) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
		
		sc.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		String[] str = new String[N];

		for(int i=0;i<N;i++){
			str[i]=sc.next();
		}
		
		boolean Flg = true;
		
		//重複チェック
		String hikaku ="";
		int cnt = 0;
		for(int i=0;i<N;i++) {
			hikaku = str[i];
			for(int j=0;j<N;j++) {
				if(str[j].equals(hikaku)) {
					cnt++;
				}
			}
		}
		//重複なし
		if(cnt==N) {
			String matubi = "";
			for(int i=0;i<N-1;i++) {
				matubi = String.valueOf(str[i].charAt(str[i].length()-1));
				if(!matubi.equals(String.valueOf(str[i+1].charAt(0)))) {
					Flg= false;
				}
			}
		}else {
			Flg=false;
		}
		
		if(Flg) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
		
		sc.close();
	}
} 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[] str = new String[N];

		for(int i=0;i<N;i++){
			str[i]=sc.next();
		}
		
		boolean Flg = true;
		
		//重複チェック
		String hikaku ="";
		int cnt = 0;
		for(int i=0;i<N;i++) {
			hikaku = str[i];
			for(int j=0;j<N;j++) {
				if(str[j].equals(hikaku)) {
					cnt++;
				}
			}
		}
		//重複なし
		if(cnt==N) {
			String matubi = "";
			for(int i=0;i<N-1;i++) {
				matubi = String.valueOf(str[i].charAt(str[i].length()-1));
				if(!matubi.equals(String.valueOf(str[i+1].charAt(0)))) {
					Flg= false;
				}
			}
		}else {
			Flg=false;
		}
		
		if(Flg) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
		
		sc.close();
	}
}