import java.util.*;
import static java.lang.Integer.*;
//import static java.lang.Long.*;
import static java.lang.Math.*;
import static java.lang.System.*;

public class Main {
	public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		int n = parseInt(sc.next());
		String[] w = new String[n];
		HashMap<String, Integer> hm = new HashMap<>();
		for(i=0;i<n;i++) {
			w[i] = sc.next();
			if(hm.containsKey(w[i])) {
				hm.put(w[i], hm.get(w[i])+1);
			} else {
				hm.put(w[i], 1);
			}
		}
		sc.close();
		boolean f=true;
		ArrayList<Integer> list = new ArrayList<>(hm.values());
		Collections.sort(list, Comparator.reverseOrder());
		if(list.get(0)>1) {
			f=false;
		} else {
			for(i=0;i<n-1;i++) {
				if(w[i].charAt(w[i].length()-1) != w[i+1].charAt(0)) {
					f=false;
					break;
				}
			}
		}
		out.println(f?"Yes":"No");
	}
} import java.util.*; util.* java import static java.lang.Integer.*; import static java.lang.Integer.*; import static java.lang.Integer.*; import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.System.*; import static java.lang.System.*; import static java.lang.System.*; public class Main {
	public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		int n = parseInt(sc.next());
		String[] w = new String[n];
		HashMap<String, Integer> hm = new HashMap<>();
		for(i=0;i<n;i++) {
			w[i] = sc.next();
			if(hm.containsKey(w[i])) {
				hm.put(w[i], hm.get(w[i])+1);
			} else {
				hm.put(w[i], 1);
			}
		}
		sc.close();
		boolean f=true;
		ArrayList<Integer> list = new ArrayList<>(hm.values());
		Collections.sort(list, Comparator.reverseOrder());
		if(list.get(0)>1) {
			f=false;
		} else {
			for(i=0;i<n-1;i++) {
				if(w[i].charAt(w[i].length()-1) != w[i+1].charAt(0)) {
					f=false;
					break;
				}
			}
		}
		out.println(f?"Yes":"No");
	}
} Main public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		int n = parseInt(sc.next());
		String[] w = new String[n];
		HashMap<String, Integer> hm = new HashMap<>();
		for(i=0;i<n;i++) {
			w[i] = sc.next();
			if(hm.containsKey(w[i])) {
				hm.put(w[i], hm.get(w[i])+1);
			} else {
				hm.put(w[i], 1);
			}
		}
		sc.close();
		boolean f=true;
		ArrayList<Integer> list = new ArrayList<>(hm.values());
		Collections.sort(list, Comparator.reverseOrder());
		if(list.get(0)>1) {
			f=false;
		} else {
			for(i=0;i<n-1;i++) {
				if(w[i].charAt(w[i].length()-1) != w[i+1].charAt(0)) {
					f=false;
					break;
				}
			}
		}
		out.println(f?"Yes":"No");
	} main {
		int i,j;
		Scanner sc = new Scanner(in);
		int n = parseInt(sc.next());
		String[] w = new String[n];
		HashMap<String, Integer> hm = new HashMap<>();
		for(i=0;i<n;i++) {
			w[i] = sc.next();
			if(hm.containsKey(w[i])) {
				hm.put(w[i], hm.get(w[i])+1);
			} else {
				hm.put(w[i], 1);
			}
		}
		sc.close();
		boolean f=true;
		ArrayList<Integer> list = new ArrayList<>(hm.values());
		Collections.sort(list, Comparator.reverseOrder());
		if(list.get(0)>1) {
			f=false;
		} else {
			for(i=0;i<n-1;i++) {
				if(w[i].charAt(w[i].length()-1) != w[i+1].charAt(0)) {
					f=false;
					break;
				}
			}
		}
		out.println(f?"Yes":"No");
	} int i i j; j Scanner sc = new Scanner(in); sc new Scanner(in) int n = parseInt(sc.next()); n parseInt(sc.next()) parseInt sc.next() sc.next sc String[] w = new String[n]; w new String[n] n HashMap<String, Integer> hm = new HashMap<>(); hm new HashMap<>() for(i=0;i<n;i++) {
			w[i] = sc.next();
			if(hm.containsKey(w[i])) {
				hm.put(w[i], hm.get(w[i])+1);
			} else {
				hm.put(w[i], 1);
			}
		} i=0; i=0 i 0 i<n i n i++ i++ i {
			w[i] = sc.next();
			if(hm.containsKey(w[i])) {
				hm.put(w[i], hm.get(w[i])+1);
			} else {
				hm.put(w[i], 1);
			}
		} {
			w[i] = sc.next();
			if(hm.containsKey(w[i])) {
				hm.put(w[i], hm.get(w[i])+1);
			} else {
				hm.put(w[i], 1);
			}
		} w[i] = sc.next() w[i] w i sc.next() sc.next sc if(hm.containsKey(w[i])) {
				hm.put(w[i], hm.get(w[i])+1);
			} else {
				hm.put(w[i], 1);
			} hm.containsKey(w[i]) hm.containsKey hm w[i] w i {
				hm.put(w[i], hm.get(w[i])+1);
			} hm.put(w[i], hm.get(w[i])+1) hm.put hm w[i] w i hm.get(w[i])+1 hm.get(w[i]) hm.get hm w[i] w i 1 {
				hm.put(w[i], 1);
			} hm.put(w[i], 1) hm.put hm w[i] w i 1 sc.close() sc.close sc boolean f=true; f true ArrayList<Integer> list = new ArrayList<>(hm.values()); list new ArrayList<>(hm.values()) Collections.sort(list, Comparator.reverseOrder()) Collections.sort Collections list Comparator.reverseOrder() Comparator.reverseOrder Comparator if(list.get(0)>1) {
			f=false;
		} else {
			for(i=0;i<n-1;i++) {
				if(w[i].charAt(w[i].length()-1) != w[i+1].charAt(0)) {
					f=false;
					break;
				}
			}
		} list.get(0)>1 list.get(0) list.get list 0 1 {
			f=false;
		} f=false f false {
			for(i=0;i<n-1;i++) {
				if(w[i].charAt(w[i].length()-1) != w[i+1].charAt(0)) {
					f=false;
					break;
				}
			}
		} for(i=0;i<n-1;i++) {
				if(w[i].charAt(w[i].length()-1) != w[i+1].charAt(0)) {
					f=false;
					break;
				}
			} i=0; i=0 i 0 i<n-1 i n-1 n 1 i++ i++ i {
				if(w[i].charAt(w[i].length()-1) != w[i+1].charAt(0)) {
					f=false;
					break;
				}
			} {
				if(w[i].charAt(w[i].length()-1) != w[i+1].charAt(0)) {
					f=false;
					break;
				}
			} if(w[i].charAt(w[i].length()-1) != w[i+1].charAt(0)) {
					f=false;
					break;
				} w[i].charAt(w[i].length()-1) != w[i+1].charAt(0) w[i].charAt(w[i].length()-1) w[i].charAt w[i] w i w[i].length()-1 w[i].length() w[i].length w[i] w i 1 w[i+1].charAt(0) w[i+1].charAt w[i+1] w i+1 i 1 0 {
					f=false;
					break;
				} f=false f false break; out.println(f?"Yes":"No") out.println out f?"Yes":"No" f "Yes" "No" String[] args args public class Main {
	public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		int n = parseInt(sc.next());
		String[] w = new String[n];
		HashMap<String, Integer> hm = new HashMap<>();
		for(i=0;i<n;i++) {
			w[i] = sc.next();
			if(hm.containsKey(w[i])) {
				hm.put(w[i], hm.get(w[i])+1);
			} else {
				hm.put(w[i], 1);
			}
		}
		sc.close();
		boolean f=true;
		ArrayList<Integer> list = new ArrayList<>(hm.values());
		Collections.sort(list, Comparator.reverseOrder());
		if(list.get(0)>1) {
			f=false;
		} else {
			for(i=0;i<n-1;i++) {
				if(w[i].charAt(w[i].length()-1) != w[i+1].charAt(0)) {
					f=false;
					break;
				}
			}
		}
		out.println(f?"Yes":"No");
	}
} public class Main {
	public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		int n = parseInt(sc.next());
		String[] w = new String[n];
		HashMap<String, Integer> hm = new HashMap<>();
		for(i=0;i<n;i++) {
			w[i] = sc.next();
			if(hm.containsKey(w[i])) {
				hm.put(w[i], hm.get(w[i])+1);
			} else {
				hm.put(w[i], 1);
			}
		}
		sc.close();
		boolean f=true;
		ArrayList<Integer> list = new ArrayList<>(hm.values());
		Collections.sort(list, Comparator.reverseOrder());
		if(list.get(0)>1) {
			f=false;
		} else {
			for(i=0;i<n-1;i++) {
				if(w[i].charAt(w[i].length()-1) != w[i+1].charAt(0)) {
					f=false;
					break;
				}
			}
		}
		out.println(f?"Yes":"No");
	}
} Main
import java.util.*;
import static java.lang.Integer.*;
//import static java.lang.Long.*;
import static java.lang.Math.*;
import static java.lang.System.*;

public class Main {
	public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		int n = parseInt(sc.next());
		String[] w = new String[n];
		HashMap<String, Integer> hm = new HashMap<>();
		for(i=0;i<n;i++) {
			w[i] = sc.next();
			if(hm.containsKey(w[i])) {
				hm.put(w[i], hm.get(w[i])+1);
			} else {
				hm.put(w[i], 1);
			}
		}
		sc.close();
		boolean f=true;
		ArrayList<Integer> list = new ArrayList<>(hm.values());
		Collections.sort(list, Comparator.reverseOrder());
		if(list.get(0)>1) {
			f=false;
		} else {
			for(i=0;i<n-1;i++) {
				if(w[i].charAt(w[i].length()-1) != w[i+1].charAt(0)) {
					f=false;
					break;
				}
			}
		}
		out.println(f?"Yes":"No");
	}
}
