import java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		boolean followRulesFlg = true;
		ArrayList<String> stringsA = new ArrayList<>();
			
		for(int a = 0; a<N; a++){
			stringsA.add(sc.next());
		}
		sc.close();
		
		ArrayList<String> stringsB = new ArrayList<>(stringsA);
		Collections.sort(stringsB);
		
		for(int a = 0; a<stringsA.size()-1; a++){
			int b = a+1;
			if(stringsA.get(a).charAt(stringsA.get(a).length()-1)!=stringsA.get(b).charAt(0)){
				followRulesFlg=false;
				break;
			}
			if(stringsB.get(a).equals(stringsB.get(b))){
				followRulesFlg=false;
				break;
			}
		}
		System.out.println(followRulesFlg? "Yes" : "No");
	}
} import java.util.*; util.* java public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		boolean followRulesFlg = true;
		ArrayList<String> stringsA = new ArrayList<>();
			
		for(int a = 0; a<N; a++){
			stringsA.add(sc.next());
		}
		sc.close();
		
		ArrayList<String> stringsB = new ArrayList<>(stringsA);
		Collections.sort(stringsB);
		
		for(int a = 0; a<stringsA.size()-1; a++){
			int b = a+1;
			if(stringsA.get(a).charAt(stringsA.get(a).length()-1)!=stringsA.get(b).charAt(0)){
				followRulesFlg=false;
				break;
			}
			if(stringsB.get(a).equals(stringsB.get(b))){
				followRulesFlg=false;
				break;
			}
		}
		System.out.println(followRulesFlg? "Yes" : "No");
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		boolean followRulesFlg = true;
		ArrayList<String> stringsA = new ArrayList<>();
			
		for(int a = 0; a<N; a++){
			stringsA.add(sc.next());
		}
		sc.close();
		
		ArrayList<String> stringsB = new ArrayList<>(stringsA);
		Collections.sort(stringsB);
		
		for(int a = 0; a<stringsA.size()-1; a++){
			int b = a+1;
			if(stringsA.get(a).charAt(stringsA.get(a).length()-1)!=stringsA.get(b).charAt(0)){
				followRulesFlg=false;
				break;
			}
			if(stringsB.get(a).equals(stringsB.get(b))){
				followRulesFlg=false;
				break;
			}
		}
		System.out.println(followRulesFlg? "Yes" : "No");
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		boolean followRulesFlg = true;
		ArrayList<String> stringsA = new ArrayList<>();
			
		for(int a = 0; a<N; a++){
			stringsA.add(sc.next());
		}
		sc.close();
		
		ArrayList<String> stringsB = new ArrayList<>(stringsA);
		Collections.sort(stringsB);
		
		for(int a = 0; a<stringsA.size()-1; a++){
			int b = a+1;
			if(stringsA.get(a).charAt(stringsA.get(a).length()-1)!=stringsA.get(b).charAt(0)){
				followRulesFlg=false;
				break;
			}
			if(stringsB.get(a).equals(stringsB.get(b))){
				followRulesFlg=false;
				break;
			}
		}
		System.out.println(followRulesFlg? "Yes" : "No");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc boolean followRulesFlg = true; followRulesFlg true ArrayList<String> stringsA = new ArrayList<>(); stringsA new ArrayList<>() for(int a = 0; a<N; a++){
			stringsA.add(sc.next());
		} int a = 0; int a = 0; a 0 a<N a N a++ a++ a {
			stringsA.add(sc.next());
		} {
			stringsA.add(sc.next());
		} stringsA.add(sc.next()) stringsA.add stringsA sc.next() sc.next sc sc.close() sc.close sc ArrayList<String> stringsB = new ArrayList<>(stringsA); stringsB new ArrayList<>(stringsA) Collections.sort(stringsB) Collections.sort Collections stringsB for(int a = 0; a<stringsA.size()-1; a++){
			int b = a+1;
			if(stringsA.get(a).charAt(stringsA.get(a).length()-1)!=stringsA.get(b).charAt(0)){
				followRulesFlg=false;
				break;
			}
			if(stringsB.get(a).equals(stringsB.get(b))){
				followRulesFlg=false;
				break;
			}
		} int a = 0; int a = 0; a 0 a<stringsA.size()-1 a stringsA.size()-1 stringsA.size() stringsA.size stringsA 1 a++ a++ a {
			int b = a+1;
			if(stringsA.get(a).charAt(stringsA.get(a).length()-1)!=stringsA.get(b).charAt(0)){
				followRulesFlg=false;
				break;
			}
			if(stringsB.get(a).equals(stringsB.get(b))){
				followRulesFlg=false;
				break;
			}
		} {
			int b = a+1;
			if(stringsA.get(a).charAt(stringsA.get(a).length()-1)!=stringsA.get(b).charAt(0)){
				followRulesFlg=false;
				break;
			}
			if(stringsB.get(a).equals(stringsB.get(b))){
				followRulesFlg=false;
				break;
			}
		} int b = a+1; b a+1 a 1 if(stringsA.get(a).charAt(stringsA.get(a).length()-1)!=stringsA.get(b).charAt(0)){
				followRulesFlg=false;
				break;
			} stringsA.get(a).charAt(stringsA.get(a).length()-1)!=stringsA.get(b).charAt(0) stringsA.get(a).charAt(stringsA.get(a).length()-1) stringsA.get(a).charAt stringsA.get(a) stringsA.get stringsA a stringsA.get(a).length()-1 stringsA.get(a).length() stringsA.get(a).length stringsA.get(a) stringsA.get stringsA a 1 stringsA.get(b).charAt(0) stringsA.get(b).charAt stringsA.get(b) stringsA.get stringsA b 0 {
				followRulesFlg=false;
				break;
			} followRulesFlg=false followRulesFlg false break; if(stringsB.get(a).equals(stringsB.get(b))){
				followRulesFlg=false;
				break;
			} stringsB.get(a).equals(stringsB.get(b)) stringsB.get(a).equals stringsB.get(a) stringsB.get stringsB a stringsB.get(b) stringsB.get stringsB b {
				followRulesFlg=false;
				break;
			} followRulesFlg=false followRulesFlg false break; System.out.println(followRulesFlg? "Yes" : "No") System.out.println System.out System System.out followRulesFlg? "Yes" : "No" followRulesFlg "Yes" "No" String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		boolean followRulesFlg = true;
		ArrayList<String> stringsA = new ArrayList<>();
			
		for(int a = 0; a<N; a++){
			stringsA.add(sc.next());
		}
		sc.close();
		
		ArrayList<String> stringsB = new ArrayList<>(stringsA);
		Collections.sort(stringsB);
		
		for(int a = 0; a<stringsA.size()-1; a++){
			int b = a+1;
			if(stringsA.get(a).charAt(stringsA.get(a).length()-1)!=stringsA.get(b).charAt(0)){
				followRulesFlg=false;
				break;
			}
			if(stringsB.get(a).equals(stringsB.get(b))){
				followRulesFlg=false;
				break;
			}
		}
		System.out.println(followRulesFlg? "Yes" : "No");
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		boolean followRulesFlg = true;
		ArrayList<String> stringsA = new ArrayList<>();
			
		for(int a = 0; a<N; a++){
			stringsA.add(sc.next());
		}
		sc.close();
		
		ArrayList<String> stringsB = new ArrayList<>(stringsA);
		Collections.sort(stringsB);
		
		for(int a = 0; a<stringsA.size()-1; a++){
			int b = a+1;
			if(stringsA.get(a).charAt(stringsA.get(a).length()-1)!=stringsA.get(b).charAt(0)){
				followRulesFlg=false;
				break;
			}
			if(stringsB.get(a).equals(stringsB.get(b))){
				followRulesFlg=false;
				break;
			}
		}
		System.out.println(followRulesFlg? "Yes" : "No");
	}
} Main
import java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		boolean followRulesFlg = true;
		ArrayList<String> stringsA = new ArrayList<>();
			
		for(int a = 0; a<N; a++){
			stringsA.add(sc.next());
		}
		sc.close();
		
		ArrayList<String> stringsB = new ArrayList<>(stringsA);
		Collections.sort(stringsB);
		
		for(int a = 0; a<stringsA.size()-1; a++){
			int b = a+1;
			if(stringsA.get(a).charAt(stringsA.get(a).length()-1)!=stringsA.get(b).charAt(0)){
				followRulesFlg=false;
				break;
			}
			if(stringsB.get(a).equals(stringsB.get(b))){
				followRulesFlg=false;
				break;
			}
		}
		System.out.println(followRulesFlg? "Yes" : "No");
	}
}