import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.Scanner;
import java.util.Set;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		
		Set<String> Ws = new LinkedHashSet<>();

		for (int i = 0; i < N; i++) {
			Ws.add(sc.next());
		}
		
		if (Ws.size() != N) {
			System.out.println("No");
			return;
		}
		
		Iterator<String> iteratorWs = Ws.iterator();
		
		String W = iteratorWs.next();
		
		String lastCha = W.substring(W.length() - 1);
			
		//System.out.println(lastCha);
		
		for (int i = 1; i < N; i++) {
			
			String tmp = iteratorWs.next();
			//System.out.println(tmp);
			
			if (!lastCha.equals(tmp.substring(0,1))) {
				System.out.println("No");
				return;
			}
			lastCha = tmp.substring(tmp.length() - 1);
			//System.out.println(lastCha);
			
			
		}
		
		System.out.println("Yes");
	}
} import java.util.Iterator; Iterator java.util import java.util.LinkedHashSet; LinkedHashSet java.util import java.util.Scanner; Scanner java.util import java.util.Set; Set java.util public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		
		Set<String> Ws = new LinkedHashSet<>();

		for (int i = 0; i < N; i++) {
			Ws.add(sc.next());
		}
		
		if (Ws.size() != N) {
			System.out.println("No");
			return;
		}
		
		Iterator<String> iteratorWs = Ws.iterator();
		
		String W = iteratorWs.next();
		
		String lastCha = W.substring(W.length() - 1);
			
		//System.out.println(lastCha);
		
		for (int i = 1; i < N; i++) {
			
			String tmp = iteratorWs.next();
			//System.out.println(tmp);
			
			if (!lastCha.equals(tmp.substring(0,1))) {
				System.out.println("No");
				return;
			}
			lastCha = tmp.substring(tmp.length() - 1);
			//System.out.println(lastCha);
			
			
		}
		
		System.out.println("Yes");
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		
		Set<String> Ws = new LinkedHashSet<>();

		for (int i = 0; i < N; i++) {
			Ws.add(sc.next());
		}
		
		if (Ws.size() != N) {
			System.out.println("No");
			return;
		}
		
		Iterator<String> iteratorWs = Ws.iterator();
		
		String W = iteratorWs.next();
		
		String lastCha = W.substring(W.length() - 1);
			
		//System.out.println(lastCha);
		
		for (int i = 1; i < N; i++) {
			
			String tmp = iteratorWs.next();
			//System.out.println(tmp);
			
			if (!lastCha.equals(tmp.substring(0,1))) {
				System.out.println("No");
				return;
			}
			lastCha = tmp.substring(tmp.length() - 1);
			//System.out.println(lastCha);
			
			
		}
		
		System.out.println("Yes");
	} main {
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		
		Set<String> Ws = new LinkedHashSet<>();

		for (int i = 0; i < N; i++) {
			Ws.add(sc.next());
		}
		
		if (Ws.size() != N) {
			System.out.println("No");
			return;
		}
		
		Iterator<String> iteratorWs = Ws.iterator();
		
		String W = iteratorWs.next();
		
		String lastCha = W.substring(W.length() - 1);
			
		//System.out.println(lastCha);
		
		for (int i = 1; i < N; i++) {
			
			String tmp = iteratorWs.next();
			//System.out.println(tmp);
			
			if (!lastCha.equals(tmp.substring(0,1))) {
				System.out.println("No");
				return;
			}
			lastCha = tmp.substring(tmp.length() - 1);
			//System.out.println(lastCha);
			
			
		}
		
		System.out.println("Yes");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc Set<String> Ws = new LinkedHashSet<>(); Ws new LinkedHashSet<>() for (int i = 0; i < N; i++) {
			Ws.add(sc.next());
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			Ws.add(sc.next());
		} {
			Ws.add(sc.next());
		} Ws.add(sc.next()) Ws.add Ws sc.next() sc.next sc if (Ws.size() != N) {
			System.out.println("No");
			return;
		} Ws.size() != N Ws.size() Ws.size Ws N {
			System.out.println("No");
			return;
		} System.out.println("No") System.out.println System.out System System.out "No" return; Iterator<String> iteratorWs = Ws.iterator(); iteratorWs Ws.iterator() Ws.iterator Ws String W = iteratorWs.next(); W iteratorWs.next() iteratorWs.next iteratorWs String lastCha = W.substring(W.length() - 1); lastCha W.substring(W.length() - 1) W.substring W W.length() - 1 W.length() W.length W 1 for (int i = 1; i < N; i++) {
			
			String tmp = iteratorWs.next();
			//System.out.println(tmp);
			
			if (!lastCha.equals(tmp.substring(0,1))) {
				System.out.println("No");
				return;
			}
			lastCha = tmp.substring(tmp.length() - 1);
			//System.out.println(lastCha);
			
			
		} int i = 1; int i = 1; i 1 i < N i N i++ i++ i {
			
			String tmp = iteratorWs.next();
			//System.out.println(tmp);
			
			if (!lastCha.equals(tmp.substring(0,1))) {
				System.out.println("No");
				return;
			}
			lastCha = tmp.substring(tmp.length() - 1);
			//System.out.println(lastCha);
			
			
		} {
			
			String tmp = iteratorWs.next();
			//System.out.println(tmp);
			
			if (!lastCha.equals(tmp.substring(0,1))) {
				System.out.println("No");
				return;
			}
			lastCha = tmp.substring(tmp.length() - 1);
			//System.out.println(lastCha);
			
			
		} String tmp = iteratorWs.next(); tmp iteratorWs.next() iteratorWs.next iteratorWs if (!lastCha.equals(tmp.substring(0,1))) {
				System.out.println("No");
				return;
			} !lastCha.equals(tmp.substring(0,1)) lastCha.equals(tmp.substring(0,1)) lastCha.equals lastCha tmp.substring(0,1) tmp.substring tmp 0 1 {
				System.out.println("No");
				return;
			} System.out.println("No") System.out.println System.out System System.out "No" return; lastCha = tmp.substring(tmp.length() - 1) lastCha tmp.substring(tmp.length() - 1) tmp.substring tmp tmp.length() - 1 tmp.length() tmp.length tmp 1 System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		
		Set<String> Ws = new LinkedHashSet<>();

		for (int i = 0; i < N; i++) {
			Ws.add(sc.next());
		}
		
		if (Ws.size() != N) {
			System.out.println("No");
			return;
		}
		
		Iterator<String> iteratorWs = Ws.iterator();
		
		String W = iteratorWs.next();
		
		String lastCha = W.substring(W.length() - 1);
			
		//System.out.println(lastCha);
		
		for (int i = 1; i < N; i++) {
			
			String tmp = iteratorWs.next();
			//System.out.println(tmp);
			
			if (!lastCha.equals(tmp.substring(0,1))) {
				System.out.println("No");
				return;
			}
			lastCha = tmp.substring(tmp.length() - 1);
			//System.out.println(lastCha);
			
			
		}
		
		System.out.println("Yes");
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		
		Set<String> Ws = new LinkedHashSet<>();

		for (int i = 0; i < N; i++) {
			Ws.add(sc.next());
		}
		
		if (Ws.size() != N) {
			System.out.println("No");
			return;
		}
		
		Iterator<String> iteratorWs = Ws.iterator();
		
		String W = iteratorWs.next();
		
		String lastCha = W.substring(W.length() - 1);
			
		//System.out.println(lastCha);
		
		for (int i = 1; i < N; i++) {
			
			String tmp = iteratorWs.next();
			//System.out.println(tmp);
			
			if (!lastCha.equals(tmp.substring(0,1))) {
				System.out.println("No");
				return;
			}
			lastCha = tmp.substring(tmp.length() - 1);
			//System.out.println(lastCha);
			
			
		}
		
		System.out.println("Yes");
	}
} Main
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.Scanner;
import java.util.Set;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		
		Set<String> Ws = new LinkedHashSet<>();

		for (int i = 0; i < N; i++) {
			Ws.add(sc.next());
		}
		
		if (Ws.size() != N) {
			System.out.println("No");
			return;
		}
		
		Iterator<String> iteratorWs = Ws.iterator();
		
		String W = iteratorWs.next();
		
		String lastCha = W.substring(W.length() - 1);
			
		//System.out.println(lastCha);
		
		for (int i = 1; i < N; i++) {
			
			String tmp = iteratorWs.next();
			//System.out.println(tmp);
			
			if (!lastCha.equals(tmp.substring(0,1))) {
				System.out.println("No");
				return;
			}
			lastCha = tmp.substring(tmp.length() - 1);
			//System.out.println(lastCha);
			
			
		}
		
		System.out.println("Yes");
	}
}