import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int num = sc.nextInt();
		String words[] = new String[num];
		for(int i = 0; i < num; i ++) {
			words[i] = sc.next();
		}
		boolean isCorrect = true;

		end: for(int i = 1; i < num; i ++) {
			for(int j = 0; j < i; j ++) {
				if(words[i].equals(words[j])) {
					isCorrect = false;
					break end;
				}
			}
		}
		if(isCorrect) {
			end: for(int i = 1; i < num; i ++) {
				char firstChar = words[i].charAt(0);
				char lastChar = words[i - 1].charAt(words[i - 1].length() - 1);
				if(firstChar != lastChar) {
					isCorrect = false;
					break end;
				}
			}
		}
		System.out.println(isCorrect ? "Yes" : "No");
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int num = sc.nextInt();
		String words[] = new String[num];
		for(int i = 0; i < num; i ++) {
			words[i] = sc.next();
		}
		boolean isCorrect = true;

		end: for(int i = 1; i < num; i ++) {
			for(int j = 0; j < i; j ++) {
				if(words[i].equals(words[j])) {
					isCorrect = false;
					break end;
				}
			}
		}
		if(isCorrect) {
			end: for(int i = 1; i < num; i ++) {
				char firstChar = words[i].charAt(0);
				char lastChar = words[i - 1].charAt(words[i - 1].length() - 1);
				if(firstChar != lastChar) {
					isCorrect = false;
					break end;
				}
			}
		}
		System.out.println(isCorrect ? "Yes" : "No");
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int num = sc.nextInt();
		String words[] = new String[num];
		for(int i = 0; i < num; i ++) {
			words[i] = sc.next();
		}
		boolean isCorrect = true;

		end: for(int i = 1; i < num; i ++) {
			for(int j = 0; j < i; j ++) {
				if(words[i].equals(words[j])) {
					isCorrect = false;
					break end;
				}
			}
		}
		if(isCorrect) {
			end: for(int i = 1; i < num; i ++) {
				char firstChar = words[i].charAt(0);
				char lastChar = words[i - 1].charAt(words[i - 1].length() - 1);
				if(firstChar != lastChar) {
					isCorrect = false;
					break end;
				}
			}
		}
		System.out.println(isCorrect ? "Yes" : "No");
	} main {
		Scanner sc = new Scanner(System.in);
		int num = sc.nextInt();
		String words[] = new String[num];
		for(int i = 0; i < num; i ++) {
			words[i] = sc.next();
		}
		boolean isCorrect = true;

		end: for(int i = 1; i < num; i ++) {
			for(int j = 0; j < i; j ++) {
				if(words[i].equals(words[j])) {
					isCorrect = false;
					break end;
				}
			}
		}
		if(isCorrect) {
			end: for(int i = 1; i < num; i ++) {
				char firstChar = words[i].charAt(0);
				char lastChar = words[i - 1].charAt(words[i - 1].length() - 1);
				if(firstChar != lastChar) {
					isCorrect = false;
					break end;
				}
			}
		}
		System.out.println(isCorrect ? "Yes" : "No");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc String words[] = new String[num]; words new String[num] num for(int i = 0; i < num; i ++) {
			words[i] = sc.next();
		} int i = 0; int i = 0; i 0 i < num i num i ++ i ++ i {
			words[i] = sc.next();
		} {
			words[i] = sc.next();
		} words[i] = sc.next() words[i] words i sc.next() sc.next sc boolean isCorrect = true; isCorrect true if(isCorrect) {
			end: for(int i = 1; i < num; i ++) {
				char firstChar = words[i].charAt(0);
				char lastChar = words[i - 1].charAt(words[i - 1].length() - 1);
				if(firstChar != lastChar) {
					isCorrect = false;
					break end;
				}
			}
		} isCorrect {
			end: for(int i = 1; i < num; i ++) {
				char firstChar = words[i].charAt(0);
				char lastChar = words[i - 1].charAt(words[i - 1].length() - 1);
				if(firstChar != lastChar) {
					isCorrect = false;
					break end;
				}
			}
		} System.out.println(isCorrect ? "Yes" : "No") System.out.println System.out System System.out isCorrect ? "Yes" : "No" isCorrect "Yes" "No" String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int num = sc.nextInt();
		String words[] = new String[num];
		for(int i = 0; i < num; i ++) {
			words[i] = sc.next();
		}
		boolean isCorrect = true;

		end: for(int i = 1; i < num; i ++) {
			for(int j = 0; j < i; j ++) {
				if(words[i].equals(words[j])) {
					isCorrect = false;
					break end;
				}
			}
		}
		if(isCorrect) {
			end: for(int i = 1; i < num; i ++) {
				char firstChar = words[i].charAt(0);
				char lastChar = words[i - 1].charAt(words[i - 1].length() - 1);
				if(firstChar != lastChar) {
					isCorrect = false;
					break end;
				}
			}
		}
		System.out.println(isCorrect ? "Yes" : "No");
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int num = sc.nextInt();
		String words[] = new String[num];
		for(int i = 0; i < num; i ++) {
			words[i] = sc.next();
		}
		boolean isCorrect = true;

		end: for(int i = 1; i < num; i ++) {
			for(int j = 0; j < i; j ++) {
				if(words[i].equals(words[j])) {
					isCorrect = false;
					break end;
				}
			}
		}
		if(isCorrect) {
			end: for(int i = 1; i < num; i ++) {
				char firstChar = words[i].charAt(0);
				char lastChar = words[i - 1].charAt(words[i - 1].length() - 1);
				if(firstChar != lastChar) {
					isCorrect = false;
					break end;
				}
			}
		}
		System.out.println(isCorrect ? "Yes" : "No");
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int num = sc.nextInt();
		String words[] = new String[num];
		for(int i = 0; i < num; i ++) {
			words[i] = sc.next();
		}
		boolean isCorrect = true;

		end: for(int i = 1; i < num; i ++) {
			for(int j = 0; j < i; j ++) {
				if(words[i].equals(words[j])) {
					isCorrect = false;
					break end;
				}
			}
		}
		if(isCorrect) {
			end: for(int i = 1; i < num; i ++) {
				char firstChar = words[i].charAt(0);
				char lastChar = words[i - 1].charAt(words[i - 1].length() - 1);
				if(firstChar != lastChar) {
					isCorrect = false;
					break end;
				}
			}
		}
		System.out.println(isCorrect ? "Yes" : "No");
	}
}