import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;

public class Main{
	public static void main(String[] args)throws Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		ArrayList<String> words = new ArrayList<String>();
		for(int i = 0 ; i < n ; i++){
			words.add(br.readLine());
		}
		
		for(int i = 0 ; i < n ; i++){
			for(int j = 0 ; j < i ; j++){
				if(words.get(i).compareTo(words.get(j)) == 0){
					System.out.println("No");
					return;
				}
			}
			if(i > 0){
				int c = words.get(i-1).length() -1;
				if(words.get(i-1).charAt(c) != words.get(i).charAt(0)){
					System.out.println("No");
					return;
				}
			}
		}
		
		System.out.println("Yes");
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util public class Main{
	public static void main(String[] args)throws Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		ArrayList<String> words = new ArrayList<String>();
		for(int i = 0 ; i < n ; i++){
			words.add(br.readLine());
		}
		
		for(int i = 0 ; i < n ; i++){
			for(int j = 0 ; j < i ; j++){
				if(words.get(i).compareTo(words.get(j)) == 0){
					System.out.println("No");
					return;
				}
			}
			if(i > 0){
				int c = words.get(i-1).length() -1;
				if(words.get(i-1).charAt(c) != words.get(i).charAt(0)){
					System.out.println("No");
					return;
				}
			}
		}
		
		System.out.println("Yes");
	}
} Main public static void main(String[] args)throws Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		ArrayList<String> words = new ArrayList<String>();
		for(int i = 0 ; i < n ; i++){
			words.add(br.readLine());
		}
		
		for(int i = 0 ; i < n ; i++){
			for(int j = 0 ; j < i ; j++){
				if(words.get(i).compareTo(words.get(j)) == 0){
					System.out.println("No");
					return;
				}
			}
			if(i > 0){
				int c = words.get(i-1).length() -1;
				if(words.get(i-1).charAt(c) != words.get(i).charAt(0)){
					System.out.println("No");
					return;
				}
			}
		}
		
		System.out.println("Yes");
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		ArrayList<String> words = new ArrayList<String>();
		for(int i = 0 ; i < n ; i++){
			words.add(br.readLine());
		}
		
		for(int i = 0 ; i < n ; i++){
			for(int j = 0 ; j < i ; j++){
				if(words.get(i).compareTo(words.get(j)) == 0){
					System.out.println("No");
					return;
				}
			}
			if(i > 0){
				int c = words.get(i-1).length() -1;
				if(words.get(i-1).charAt(c) != words.get(i).charAt(0)){
					System.out.println("No");
					return;
				}
			}
		}
		
		System.out.println("Yes");
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(br.readLine()); n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br ArrayList<String> words = new ArrayList<String>(); words new ArrayList<String>() for(int i = 0 ; i < n ; i++){
			words.add(br.readLine());
		} int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i {
			words.add(br.readLine());
		} {
			words.add(br.readLine());
		} words.add(br.readLine()) words.add words br.readLine() br.readLine br for(int i = 0 ; i < n ; i++){
			for(int j = 0 ; j < i ; j++){
				if(words.get(i).compareTo(words.get(j)) == 0){
					System.out.println("No");
					return;
				}
			}
			if(i > 0){
				int c = words.get(i-1).length() -1;
				if(words.get(i-1).charAt(c) != words.get(i).charAt(0)){
					System.out.println("No");
					return;
				}
			}
		} int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i {
			for(int j = 0 ; j < i ; j++){
				if(words.get(i).compareTo(words.get(j)) == 0){
					System.out.println("No");
					return;
				}
			}
			if(i > 0){
				int c = words.get(i-1).length() -1;
				if(words.get(i-1).charAt(c) != words.get(i).charAt(0)){
					System.out.println("No");
					return;
				}
			}
		} {
			for(int j = 0 ; j < i ; j++){
				if(words.get(i).compareTo(words.get(j)) == 0){
					System.out.println("No");
					return;
				}
			}
			if(i > 0){
				int c = words.get(i-1).length() -1;
				if(words.get(i-1).charAt(c) != words.get(i).charAt(0)){
					System.out.println("No");
					return;
				}
			}
		} for(int j = 0 ; j < i ; j++){
				if(words.get(i).compareTo(words.get(j)) == 0){
					System.out.println("No");
					return;
				}
			} int j = 0 ; int j = 0 ; j 0 j < i j i j++ j++ j {
				if(words.get(i).compareTo(words.get(j)) == 0){
					System.out.println("No");
					return;
				}
			} {
				if(words.get(i).compareTo(words.get(j)) == 0){
					System.out.println("No");
					return;
				}
			} if(words.get(i).compareTo(words.get(j)) == 0){
					System.out.println("No");
					return;
				} words.get(i).compareTo(words.get(j)) == 0 words.get(i).compareTo(words.get(j)) words.get(i).compareTo words.get(i) words.get words i words.get(j) words.get words j 0 {
					System.out.println("No");
					return;
				} System.out.println("No") System.out.println System.out System System.out "No" return; if(i > 0){
				int c = words.get(i-1).length() -1;
				if(words.get(i-1).charAt(c) != words.get(i).charAt(0)){
					System.out.println("No");
					return;
				}
			} i > 0 i 0 {
				int c = words.get(i-1).length() -1;
				if(words.get(i-1).charAt(c) != words.get(i).charAt(0)){
					System.out.println("No");
					return;
				}
			} int c = words.get(i-1).length() -1; c words.get(i-1).length() -1 words.get(i-1).length() words.get(i-1).length words.get(i-1) words.get words i-1 i 1 1 if(words.get(i-1).charAt(c) != words.get(i).charAt(0)){
					System.out.println("No");
					return;
				} words.get(i-1).charAt(c) != words.get(i).charAt(0) words.get(i-1).charAt(c) words.get(i-1).charAt words.get(i-1) words.get words i-1 i 1 c words.get(i).charAt(0) words.get(i).charAt words.get(i) words.get words i 0 {
					System.out.println("No");
					return;
				} System.out.println("No") System.out.println System.out System System.out "No" return; 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)throws Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		ArrayList<String> words = new ArrayList<String>();
		for(int i = 0 ; i < n ; i++){
			words.add(br.readLine());
		}
		
		for(int i = 0 ; i < n ; i++){
			for(int j = 0 ; j < i ; j++){
				if(words.get(i).compareTo(words.get(j)) == 0){
					System.out.println("No");
					return;
				}
			}
			if(i > 0){
				int c = words.get(i-1).length() -1;
				if(words.get(i-1).charAt(c) != words.get(i).charAt(0)){
					System.out.println("No");
					return;
				}
			}
		}
		
		System.out.println("Yes");
	}
} public class Main{
	public static void main(String[] args)throws Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		ArrayList<String> words = new ArrayList<String>();
		for(int i = 0 ; i < n ; i++){
			words.add(br.readLine());
		}
		
		for(int i = 0 ; i < n ; i++){
			for(int j = 0 ; j < i ; j++){
				if(words.get(i).compareTo(words.get(j)) == 0){
					System.out.println("No");
					return;
				}
			}
			if(i > 0){
				int c = words.get(i-1).length() -1;
				if(words.get(i-1).charAt(c) != words.get(i).charAt(0)){
					System.out.println("No");
					return;
				}
			}
		}
		
		System.out.println("Yes");
	}
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;

public class Main{
	public static void main(String[] args)throws Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		ArrayList<String> words = new ArrayList<String>();
		for(int i = 0 ; i < n ; i++){
			words.add(br.readLine());
		}
		
		for(int i = 0 ; i < n ; i++){
			for(int j = 0 ; j < i ; j++){
				if(words.get(i).compareTo(words.get(j)) == 0){
					System.out.println("No");
					return;
				}
			}
			if(i > 0){
				int c = words.get(i-1).length() -1;
				if(words.get(i-1).charAt(c) != words.get(i).charAt(0)){
					System.out.println("No");
					return;
				}
			}
		}
		
		System.out.println("Yes");
	}
}
