import java.util.HashSet;
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> set = new HashSet<String>();
		String temp ="";
		for (int i=0;i<N;i++) {
			String s = sc.next();
			if (temp.equals("")==false&&s.charAt(0)!=temp.charAt(temp.length()-1)) {
				System.out.println("No");
				return ;
			}
			if (set.contains(s)) {
				System.out.println("No");
				return ;
			}
			set.add(s);
			temp = s;
		}
		System.out.println("Yes");
	}
} import java.util.HashSet; HashSet 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> set = new HashSet<String>();
		String temp ="";
		for (int i=0;i<N;i++) {
			String s = sc.next();
			if (temp.equals("")==false&&s.charAt(0)!=temp.charAt(temp.length()-1)) {
				System.out.println("No");
				return ;
			}
			if (set.contains(s)) {
				System.out.println("No");
				return ;
			}
			set.add(s);
			temp = s;
		}
		System.out.println("Yes");
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		Set<String> set = new HashSet<String>();
		String temp ="";
		for (int i=0;i<N;i++) {
			String s = sc.next();
			if (temp.equals("")==false&&s.charAt(0)!=temp.charAt(temp.length()-1)) {
				System.out.println("No");
				return ;
			}
			if (set.contains(s)) {
				System.out.println("No");
				return ;
			}
			set.add(s);
			temp = s;
		}
		System.out.println("Yes");
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		Set<String> set = new HashSet<String>();
		String temp ="";
		for (int i=0;i<N;i++) {
			String s = sc.next();
			if (temp.equals("")==false&&s.charAt(0)!=temp.charAt(temp.length()-1)) {
				System.out.println("No");
				return ;
			}
			if (set.contains(s)) {
				System.out.println("No");
				return ;
			}
			set.add(s);
			temp = s;
		}
		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> set = new HashSet<String>(); set new HashSet<String>() String temp =""; temp "" for (int i=0;i<N;i++) {
			String s = sc.next();
			if (temp.equals("")==false&&s.charAt(0)!=temp.charAt(temp.length()-1)) {
				System.out.println("No");
				return ;
			}
			if (set.contains(s)) {
				System.out.println("No");
				return ;
			}
			set.add(s);
			temp = s;
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			String s = sc.next();
			if (temp.equals("")==false&&s.charAt(0)!=temp.charAt(temp.length()-1)) {
				System.out.println("No");
				return ;
			}
			if (set.contains(s)) {
				System.out.println("No");
				return ;
			}
			set.add(s);
			temp = s;
		} {
			String s = sc.next();
			if (temp.equals("")==false&&s.charAt(0)!=temp.charAt(temp.length()-1)) {
				System.out.println("No");
				return ;
			}
			if (set.contains(s)) {
				System.out.println("No");
				return ;
			}
			set.add(s);
			temp = s;
		} String s = sc.next(); s sc.next() sc.next sc if (temp.equals("")==false&&s.charAt(0)!=temp.charAt(temp.length()-1)) {
				System.out.println("No");
				return ;
			} temp.equals("")==false&&s.charAt(0)!=temp.charAt(temp.length()-1) temp.equals("")==false temp.equals("") temp.equals temp "" false s.charAt(0)!=temp.charAt(temp.length()-1) s.charAt(0) s.charAt s 0 temp.charAt(temp.length()-1) temp.charAt temp temp.length()-1 temp.length() temp.length temp 1 {
				System.out.println("No");
				return ;
			} System.out.println("No") System.out.println System.out System System.out "No" return ; if (set.contains(s)) {
				System.out.println("No");
				return ;
			} set.contains(s) set.contains set s {
				System.out.println("No");
				return ;
			} System.out.println("No") System.out.println System.out System System.out "No" return ; set.add(s) set.add set s temp = s temp s 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> set = new HashSet<String>();
		String temp ="";
		for (int i=0;i<N;i++) {
			String s = sc.next();
			if (temp.equals("")==false&&s.charAt(0)!=temp.charAt(temp.length()-1)) {
				System.out.println("No");
				return ;
			}
			if (set.contains(s)) {
				System.out.println("No");
				return ;
			}
			set.add(s);
			temp = s;
		}
		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> set = new HashSet<String>();
		String temp ="";
		for (int i=0;i<N;i++) {
			String s = sc.next();
			if (temp.equals("")==false&&s.charAt(0)!=temp.charAt(temp.length()-1)) {
				System.out.println("No");
				return ;
			}
			if (set.contains(s)) {
				System.out.println("No");
				return ;
			}
			set.add(s);
			temp = s;
		}
		System.out.println("Yes");
	}
} Main
import java.util.HashSet;
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> set = new HashSet<String>();
		String temp ="";
		for (int i=0;i<N;i++) {
			String s = sc.next();
			if (temp.equals("")==false&&s.charAt(0)!=temp.charAt(temp.length()-1)) {
				System.out.println("No");
				return ;
			}
			if (set.contains(s)) {
				System.out.println("No");
				return ;
			}
			set.add(s);
			temp = s;
		}
		System.out.println("Yes");
	}
}