import java.util.HashSet;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		int n = sc.nextInt();
		HashSet<String> hs = new HashSet<>();
		char last = ' ';
		String str;
		boolean b = true;
		for (int i = 0; i < n; i++) {
			str = sc.next();
			if (hs.add(str)) {
				if (i != 0) {
					if (last != str.charAt(0)) {
						b = false;
						break;
					} else {
						last = str.charAt(str.length() - 1);
					}
				} else {
					last = str.charAt(str.length() - 1);
				}
			} else {
				b = false;
				break;
			}
		}
		if (b) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		int n = sc.nextInt();
		HashSet<String> hs = new HashSet<>();
		char last = ' ';
		String str;
		boolean b = true;
		for (int i = 0; i < n; i++) {
			str = sc.next();
			if (hs.add(str)) {
				if (i != 0) {
					if (last != str.charAt(0)) {
						b = false;
						break;
					} else {
						last = str.charAt(str.length() - 1);
					}
				} else {
					last = str.charAt(str.length() - 1);
				}
			} else {
				b = false;
				break;
			}
		}
		if (b) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		int n = sc.nextInt();
		HashSet<String> hs = new HashSet<>();
		char last = ' ';
		String str;
		boolean b = true;
		for (int i = 0; i < n; i++) {
			str = sc.next();
			if (hs.add(str)) {
				if (i != 0) {
					if (last != str.charAt(0)) {
						b = false;
						break;
					} else {
						last = str.charAt(str.length() - 1);
					}
				} else {
					last = str.charAt(str.length() - 1);
				}
			} else {
				b = false;
				break;
			}
		}
		if (b) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		int n = sc.nextInt();
		HashSet<String> hs = new HashSet<>();
		char last = ' ';
		String str;
		boolean b = true;
		for (int i = 0; i < n; i++) {
			str = sc.next();
			if (hs.add(str)) {
				if (i != 0) {
					if (last != str.charAt(0)) {
						b = false;
						break;
					} else {
						last = str.charAt(str.length() - 1);
					}
				} else {
					last = str.charAt(str.length() - 1);
				}
			} else {
				b = false;
				break;
			}
		}
		if (b) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) StringBuilder sb = new StringBuilder(); sb new StringBuilder() int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc HashSet<String> hs = new HashSet<>(); hs new HashSet<>() char last = ' '; last ' ' String str; str boolean b = true; b true for (int i = 0; i < n; i++) {
			str = sc.next();
			if (hs.add(str)) {
				if (i != 0) {
					if (last != str.charAt(0)) {
						b = false;
						break;
					} else {
						last = str.charAt(str.length() - 1);
					}
				} else {
					last = str.charAt(str.length() - 1);
				}
			} else {
				b = false;
				break;
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			str = sc.next();
			if (hs.add(str)) {
				if (i != 0) {
					if (last != str.charAt(0)) {
						b = false;
						break;
					} else {
						last = str.charAt(str.length() - 1);
					}
				} else {
					last = str.charAt(str.length() - 1);
				}
			} else {
				b = false;
				break;
			}
		} {
			str = sc.next();
			if (hs.add(str)) {
				if (i != 0) {
					if (last != str.charAt(0)) {
						b = false;
						break;
					} else {
						last = str.charAt(str.length() - 1);
					}
				} else {
					last = str.charAt(str.length() - 1);
				}
			} else {
				b = false;
				break;
			}
		} str = sc.next() str sc.next() sc.next sc if (hs.add(str)) {
				if (i != 0) {
					if (last != str.charAt(0)) {
						b = false;
						break;
					} else {
						last = str.charAt(str.length() - 1);
					}
				} else {
					last = str.charAt(str.length() - 1);
				}
			} else {
				b = false;
				break;
			} hs.add(str) hs.add hs str {
				if (i != 0) {
					if (last != str.charAt(0)) {
						b = false;
						break;
					} else {
						last = str.charAt(str.length() - 1);
					}
				} else {
					last = str.charAt(str.length() - 1);
				}
			} if (i != 0) {
					if (last != str.charAt(0)) {
						b = false;
						break;
					} else {
						last = str.charAt(str.length() - 1);
					}
				} else {
					last = str.charAt(str.length() - 1);
				} i != 0 i 0 {
					if (last != str.charAt(0)) {
						b = false;
						break;
					} else {
						last = str.charAt(str.length() - 1);
					}
				} if (last != str.charAt(0)) {
						b = false;
						break;
					} else {
						last = str.charAt(str.length() - 1);
					} last != str.charAt(0) last str.charAt(0) str.charAt str 0 {
						b = false;
						break;
					} b = false b false break; {
						last = str.charAt(str.length() - 1);
					} last = str.charAt(str.length() - 1) last str.charAt(str.length() - 1) str.charAt str str.length() - 1 str.length() str.length str 1 {
					last = str.charAt(str.length() - 1);
				} last = str.charAt(str.length() - 1) last str.charAt(str.length() - 1) str.charAt str str.length() - 1 str.length() str.length str 1 {
				b = false;
				break;
			} b = false b false break; if (b) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		} b {
			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" String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		int n = sc.nextInt();
		HashSet<String> hs = new HashSet<>();
		char last = ' ';
		String str;
		boolean b = true;
		for (int i = 0; i < n; i++) {
			str = sc.next();
			if (hs.add(str)) {
				if (i != 0) {
					if (last != str.charAt(0)) {
						b = false;
						break;
					} else {
						last = str.charAt(str.length() - 1);
					}
				} else {
					last = str.charAt(str.length() - 1);
				}
			} else {
				b = false;
				break;
			}
		}
		if (b) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		int n = sc.nextInt();
		HashSet<String> hs = new HashSet<>();
		char last = ' ';
		String str;
		boolean b = true;
		for (int i = 0; i < n; i++) {
			str = sc.next();
			if (hs.add(str)) {
				if (i != 0) {
					if (last != str.charAt(0)) {
						b = false;
						break;
					} else {
						last = str.charAt(str.length() - 1);
					}
				} else {
					last = str.charAt(str.length() - 1);
				}
			} else {
				b = false;
				break;
			}
		}
		if (b) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} Main
import java.util.HashSet;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		int n = sc.nextInt();
		HashSet<String> hs = new HashSet<>();
		char last = ' ';
		String str;
		boolean b = true;
		for (int i = 0; i < n; i++) {
			str = sc.next();
			if (hs.add(str)) {
				if (i != 0) {
					if (last != str.charAt(0)) {
						b = false;
						break;
					} else {
						last = str.charAt(str.length() - 1);
					}
				} else {
					last = str.charAt(str.length() - 1);
				}
			} else {
				b = false;
				break;
			}
		}
		if (b) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
}
