import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		String word[] = new String[N]; 
		
		for(int i = 0; i < N; i++) {
			word[i] = sc.next();
		}
		
		boolean isRule = true;
		for(int i = 1; i < N; i++) {
			if(word[i-1].charAt(word[i-1].length()-1) == word[i].charAt(0)) {
				isRule = true;
			}else {
				isRule = false;
				System.out.println("No");
				break;
			}
		}
		
		for(int i = 0; i < N; i++) {
			for(int j = i+1; j < N; j++){
				if(word[i].equals(word[j])) {
					isRule = false;
					System.out.println("No");
					break;
				}
			}
		}
		
		if(isRule == true) {
			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 word[] = new String[N]; 
		
		for(int i = 0; i < N; i++) {
			word[i] = sc.next();
		}
		
		boolean isRule = true;
		for(int i = 1; i < N; i++) {
			if(word[i-1].charAt(word[i-1].length()-1) == word[i].charAt(0)) {
				isRule = true;
			}else {
				isRule = false;
				System.out.println("No");
				break;
			}
		}
		
		for(int i = 0; i < N; i++) {
			for(int j = i+1; j < N; j++){
				if(word[i].equals(word[j])) {
					isRule = false;
					System.out.println("No");
					break;
				}
			}
		}
		
		if(isRule == true) {
			System.out.println("Yes");
		}
		
	}
} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		String word[] = new String[N]; 
		
		for(int i = 0; i < N; i++) {
			word[i] = sc.next();
		}
		
		boolean isRule = true;
		for(int i = 1; i < N; i++) {
			if(word[i-1].charAt(word[i-1].length()-1) == word[i].charAt(0)) {
				isRule = true;
			}else {
				isRule = false;
				System.out.println("No");
				break;
			}
		}
		
		for(int i = 0; i < N; i++) {
			for(int j = i+1; j < N; j++){
				if(word[i].equals(word[j])) {
					isRule = false;
					System.out.println("No");
					break;
				}
			}
		}
		
		if(isRule == true) {
			System.out.println("Yes");
		}
		
	} main {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		String word[] = new String[N]; 
		
		for(int i = 0; i < N; i++) {
			word[i] = sc.next();
		}
		
		boolean isRule = true;
		for(int i = 1; i < N; i++) {
			if(word[i-1].charAt(word[i-1].length()-1) == word[i].charAt(0)) {
				isRule = true;
			}else {
				isRule = false;
				System.out.println("No");
				break;
			}
		}
		
		for(int i = 0; i < N; i++) {
			for(int j = i+1; j < N; j++){
				if(word[i].equals(word[j])) {
					isRule = false;
					System.out.println("No");
					break;
				}
			}
		}
		
		if(isRule == true) {
			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 word[] = new String[N]; word new String[N] N for(int i = 0; i < N; i++) {
			word[i] = sc.next();
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			word[i] = sc.next();
		} {
			word[i] = sc.next();
		} word[i] = sc.next() word[i] word i sc.next() sc.next sc boolean isRule = true; isRule true for(int i = 1; i < N; i++) {
			if(word[i-1].charAt(word[i-1].length()-1) == word[i].charAt(0)) {
				isRule = true;
			}else {
				isRule = false;
				System.out.println("No");
				break;
			}
		} int i = 1; int i = 1; i 1 i < N i N i++ i++ i {
			if(word[i-1].charAt(word[i-1].length()-1) == word[i].charAt(0)) {
				isRule = true;
			}else {
				isRule = false;
				System.out.println("No");
				break;
			}
		} {
			if(word[i-1].charAt(word[i-1].length()-1) == word[i].charAt(0)) {
				isRule = true;
			}else {
				isRule = false;
				System.out.println("No");
				break;
			}
		} if(word[i-1].charAt(word[i-1].length()-1) == word[i].charAt(0)) {
				isRule = true;
			}else {
				isRule = false;
				System.out.println("No");
				break;
			} word[i-1].charAt(word[i-1].length()-1) == word[i].charAt(0) word[i-1].charAt(word[i-1].length()-1) word[i-1].charAt word[i-1] word i-1 i 1 word[i-1].length()-1 word[i-1].length() word[i-1].length word[i-1] word i-1 i 1 1 word[i].charAt(0) word[i].charAt word[i] word i 0 {
				isRule = true;
			} isRule = true isRule true {
				isRule = false;
				System.out.println("No");
				break;
			} isRule = false isRule false System.out.println("No") System.out.println System.out System System.out "No" break; for(int i = 0; i < N; i++) {
			for(int j = i+1; j < N; j++){
				if(word[i].equals(word[j])) {
					isRule = false;
					System.out.println("No");
					break;
				}
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			for(int j = i+1; j < N; j++){
				if(word[i].equals(word[j])) {
					isRule = false;
					System.out.println("No");
					break;
				}
			}
		} {
			for(int j = i+1; j < N; j++){
				if(word[i].equals(word[j])) {
					isRule = false;
					System.out.println("No");
					break;
				}
			}
		} for(int j = i+1; j < N; j++){
				if(word[i].equals(word[j])) {
					isRule = false;
					System.out.println("No");
					break;
				}
			} int j = i+1; int j = i+1; j i+1 i 1 j < N j N j++ j++ j {
				if(word[i].equals(word[j])) {
					isRule = false;
					System.out.println("No");
					break;
				}
			} {
				if(word[i].equals(word[j])) {
					isRule = false;
					System.out.println("No");
					break;
				}
			} if(word[i].equals(word[j])) {
					isRule = false;
					System.out.println("No");
					break;
				} word[i].equals(word[j]) word[i].equals word[i] word i word[j] word j {
					isRule = false;
					System.out.println("No");
					break;
				} isRule = false isRule false System.out.println("No") System.out.println System.out System System.out "No" break; if(isRule == true) {
			System.out.println("Yes");
		} isRule == true isRule true {
			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 sc = new Scanner(System.in);

		int N = sc.nextInt();
		String word[] = new String[N]; 
		
		for(int i = 0; i < N; i++) {
			word[i] = sc.next();
		}
		
		boolean isRule = true;
		for(int i = 1; i < N; i++) {
			if(word[i-1].charAt(word[i-1].length()-1) == word[i].charAt(0)) {
				isRule = true;
			}else {
				isRule = false;
				System.out.println("No");
				break;
			}
		}
		
		for(int i = 0; i < N; i++) {
			for(int j = i+1; j < N; j++){
				if(word[i].equals(word[j])) {
					isRule = false;
					System.out.println("No");
					break;
				}
			}
		}
		
		if(isRule == true) {
			System.out.println("Yes");
		}
		
	}
} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		String word[] = new String[N]; 
		
		for(int i = 0; i < N; i++) {
			word[i] = sc.next();
		}
		
		boolean isRule = true;
		for(int i = 1; i < N; i++) {
			if(word[i-1].charAt(word[i-1].length()-1) == word[i].charAt(0)) {
				isRule = true;
			}else {
				isRule = false;
				System.out.println("No");
				break;
			}
		}
		
		for(int i = 0; i < N; i++) {
			for(int j = i+1; j < N; j++){
				if(word[i].equals(word[j])) {
					isRule = false;
					System.out.println("No");
					break;
				}
			}
		}
		
		if(isRule == true) {
			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 word[] = new String[N]; 
		
		for(int i = 0; i < N; i++) {
			word[i] = sc.next();
		}
		
		boolean isRule = true;
		for(int i = 1; i < N; i++) {
			if(word[i-1].charAt(word[i-1].length()-1) == word[i].charAt(0)) {
				isRule = true;
			}else {
				isRule = false;
				System.out.println("No");
				break;
			}
		}
		
		for(int i = 0; i < N; i++) {
			for(int j = i+1; j < N; j++){
				if(word[i].equals(word[j])) {
					isRule = false;
					System.out.println("No");
					break;
				}
			}
		}
		
		if(isRule == true) {
			System.out.println("Yes");
		}
		
	}
}
