import java.util.*;
public class Main {

		static void solve() {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			String ans = "Yes";
			int check = 0;
			String[] array = new String[n];
			for(int i = 0;i<n;i++) {
				array[i] = sc.next();
			}
			sc.close();
			for(int i = 0;i<n-1;i++) {
				if(array[i].charAt(array[i].length()-1)!=array[i+1].charAt(0)) {
					ans = "No";
					break;
				}
						for(int j = i+1;j<n;j++) {
							if(array[i].equals(array[j])) {
								ans = "No";
								break;
							}
						}
						if("No".contentEquals(ans)) {
							break;
						}
				}
			System.out.println(ans);
			
		}
	public static void main(String[] args) {
		solve();

	}

} import java.util.*; util.* java public class Main {

		static void solve() {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			String ans = "Yes";
			int check = 0;
			String[] array = new String[n];
			for(int i = 0;i<n;i++) {
				array[i] = sc.next();
			}
			sc.close();
			for(int i = 0;i<n-1;i++) {
				if(array[i].charAt(array[i].length()-1)!=array[i+1].charAt(0)) {
					ans = "No";
					break;
				}
						for(int j = i+1;j<n;j++) {
							if(array[i].equals(array[j])) {
								ans = "No";
								break;
							}
						}
						if("No".contentEquals(ans)) {
							break;
						}
				}
			System.out.println(ans);
			
		}
	public static void main(String[] args) {
		solve();

	}

} Main static void solve() {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			String ans = "Yes";
			int check = 0;
			String[] array = new String[n];
			for(int i = 0;i<n;i++) {
				array[i] = sc.next();
			}
			sc.close();
			for(int i = 0;i<n-1;i++) {
				if(array[i].charAt(array[i].length()-1)!=array[i+1].charAt(0)) {
					ans = "No";
					break;
				}
						for(int j = i+1;j<n;j++) {
							if(array[i].equals(array[j])) {
								ans = "No";
								break;
							}
						}
						if("No".contentEquals(ans)) {
							break;
						}
				}
			System.out.println(ans);
			
		} solve {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			String ans = "Yes";
			int check = 0;
			String[] array = new String[n];
			for(int i = 0;i<n;i++) {
				array[i] = sc.next();
			}
			sc.close();
			for(int i = 0;i<n-1;i++) {
				if(array[i].charAt(array[i].length()-1)!=array[i+1].charAt(0)) {
					ans = "No";
					break;
				}
						for(int j = i+1;j<n;j++) {
							if(array[i].equals(array[j])) {
								ans = "No";
								break;
							}
						}
						if("No".contentEquals(ans)) {
							break;
						}
				}
			System.out.println(ans);
			
		} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc String ans = "Yes"; ans "Yes" int check = 0; check 0 String[] array = new String[n]; array new String[n] n for(int i = 0;i<n;i++) {
				array[i] = sc.next();
			} int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
				array[i] = sc.next();
			} {
				array[i] = sc.next();
			} array[i] = sc.next() array[i] array i sc.next() sc.next sc sc.close() sc.close sc for(int i = 0;i<n-1;i++) {
				if(array[i].charAt(array[i].length()-1)!=array[i+1].charAt(0)) {
					ans = "No";
					break;
				}
						for(int j = i+1;j<n;j++) {
							if(array[i].equals(array[j])) {
								ans = "No";
								break;
							}
						}
						if("No".contentEquals(ans)) {
							break;
						}
				} int i = 0; int i = 0; i 0 i<n-1 i n-1 n 1 i++ i++ i {
				if(array[i].charAt(array[i].length()-1)!=array[i+1].charAt(0)) {
					ans = "No";
					break;
				}
						for(int j = i+1;j<n;j++) {
							if(array[i].equals(array[j])) {
								ans = "No";
								break;
							}
						}
						if("No".contentEquals(ans)) {
							break;
						}
				} {
				if(array[i].charAt(array[i].length()-1)!=array[i+1].charAt(0)) {
					ans = "No";
					break;
				}
						for(int j = i+1;j<n;j++) {
							if(array[i].equals(array[j])) {
								ans = "No";
								break;
							}
						}
						if("No".contentEquals(ans)) {
							break;
						}
				} if(array[i].charAt(array[i].length()-1)!=array[i+1].charAt(0)) {
					ans = "No";
					break;
				} array[i].charAt(array[i].length()-1)!=array[i+1].charAt(0) array[i].charAt(array[i].length()-1) array[i].charAt array[i] array i array[i].length()-1 array[i].length() array[i].length array[i] array i 1 array[i+1].charAt(0) array[i+1].charAt array[i+1] array i+1 i 1 0 {
					ans = "No";
					break;
				} ans = "No" ans "No" break; for(int j = i+1;j<n;j++) {
							if(array[i].equals(array[j])) {
								ans = "No";
								break;
							}
						} int j = i+1; int j = i+1; j i+1 i 1 j<n j n j++ j++ j {
							if(array[i].equals(array[j])) {
								ans = "No";
								break;
							}
						} {
							if(array[i].equals(array[j])) {
								ans = "No";
								break;
							}
						} if(array[i].equals(array[j])) {
								ans = "No";
								break;
							} array[i].equals(array[j]) array[i].equals array[i] array i array[j] array j {
								ans = "No";
								break;
							} ans = "No" ans "No" break; if("No".contentEquals(ans)) {
							break;
						} "No".contentEquals(ans) "No".contentEquals "No" ans {
							break;
						} break; System.out.println(ans) System.out.println System.out System System.out ans public static void main(String[] args) {
		solve();

	} main {
		solve();

	} solve() solve String[] args args public class Main {

		static void solve() {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			String ans = "Yes";
			int check = 0;
			String[] array = new String[n];
			for(int i = 0;i<n;i++) {
				array[i] = sc.next();
			}
			sc.close();
			for(int i = 0;i<n-1;i++) {
				if(array[i].charAt(array[i].length()-1)!=array[i+1].charAt(0)) {
					ans = "No";
					break;
				}
						for(int j = i+1;j<n;j++) {
							if(array[i].equals(array[j])) {
								ans = "No";
								break;
							}
						}
						if("No".contentEquals(ans)) {
							break;
						}
				}
			System.out.println(ans);
			
		}
	public static void main(String[] args) {
		solve();

	}

} public class Main {

		static void solve() {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			String ans = "Yes";
			int check = 0;
			String[] array = new String[n];
			for(int i = 0;i<n;i++) {
				array[i] = sc.next();
			}
			sc.close();
			for(int i = 0;i<n-1;i++) {
				if(array[i].charAt(array[i].length()-1)!=array[i+1].charAt(0)) {
					ans = "No";
					break;
				}
						for(int j = i+1;j<n;j++) {
							if(array[i].equals(array[j])) {
								ans = "No";
								break;
							}
						}
						if("No".contentEquals(ans)) {
							break;
						}
				}
			System.out.println(ans);
			
		}
	public static void main(String[] args) {
		solve();

	}

} Main
import java.util.*;
public class Main {

		static void solve() {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			String ans = "Yes";
			int check = 0;
			String[] array = new String[n];
			for(int i = 0;i<n;i++) {
				array[i] = sc.next();
			}
			sc.close();
			for(int i = 0;i<n-1;i++) {
				if(array[i].charAt(array[i].length()-1)!=array[i+1].charAt(0)) {
					ans = "No";
					break;
				}
						for(int j = i+1;j<n;j++) {
							if(array[i].equals(array[j])) {
								ans = "No";
								break;
							}
						}
						if("No".contentEquals(ans)) {
							break;
						}
				}
			System.out.println(ans);
			
		}
	public static void main(String[] args) {
		solve();

	}

}
