import java.util.*;

public class Main 
{
  	public static void main(String[] args) 
    {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		HashSet<String> set = new HashSet<String>();

		String prev = sc.next();
		set.add(prev);
		for(int i = 1; i < n; i++){
			String tmp = sc.next();

			if(set.contains(tmp) || prev.charAt(prev.length() - 1) != tmp.charAt(0)){
				System.out.println("No");
				return;
			}
			set.add(tmp);
			prev = tmp;
		}
	System.out.println("Yes");
	}
} import java.util.*; util.* java public class Main 
{
  	public static void main(String[] args) 
    {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		HashSet<String> set = new HashSet<String>();

		String prev = sc.next();
		set.add(prev);
		for(int i = 1; i < n; i++){
			String tmp = sc.next();

			if(set.contains(tmp) || prev.charAt(prev.length() - 1) != tmp.charAt(0)){
				System.out.println("No");
				return;
			}
			set.add(tmp);
			prev = tmp;
		}
	System.out.println("Yes");
	}
} Main public static void main(String[] args) 
    {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		HashSet<String> set = new HashSet<String>();

		String prev = sc.next();
		set.add(prev);
		for(int i = 1; i < n; i++){
			String tmp = sc.next();

			if(set.contains(tmp) || prev.charAt(prev.length() - 1) != tmp.charAt(0)){
				System.out.println("No");
				return;
			}
			set.add(tmp);
			prev = tmp;
		}
	System.out.println("Yes");
	} main {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		HashSet<String> set = new HashSet<String>();

		String prev = sc.next();
		set.add(prev);
		for(int i = 1; i < n; i++){
			String tmp = sc.next();

			if(set.contains(tmp) || prev.charAt(prev.length() - 1) != tmp.charAt(0)){
				System.out.println("No");
				return;
			}
			set.add(tmp);
			prev = tmp;
		}
	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 HashSet<String> set = new HashSet<String>(); set new HashSet<String>() String prev = sc.next(); prev sc.next() sc.next sc set.add(prev) set.add set prev for(int i = 1; i < n; i++){
			String tmp = sc.next();

			if(set.contains(tmp) || prev.charAt(prev.length() - 1) != tmp.charAt(0)){
				System.out.println("No");
				return;
			}
			set.add(tmp);
			prev = tmp;
		} int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
			String tmp = sc.next();

			if(set.contains(tmp) || prev.charAt(prev.length() - 1) != tmp.charAt(0)){
				System.out.println("No");
				return;
			}
			set.add(tmp);
			prev = tmp;
		} {
			String tmp = sc.next();

			if(set.contains(tmp) || prev.charAt(prev.length() - 1) != tmp.charAt(0)){
				System.out.println("No");
				return;
			}
			set.add(tmp);
			prev = tmp;
		} String tmp = sc.next(); tmp sc.next() sc.next sc if(set.contains(tmp) || prev.charAt(prev.length() - 1) != tmp.charAt(0)){
				System.out.println("No");
				return;
			} set.contains(tmp) || prev.charAt(prev.length() - 1) != tmp.charAt(0) set.contains(tmp) set.contains set tmp prev.charAt(prev.length() - 1) != tmp.charAt(0) prev.charAt(prev.length() - 1) prev.charAt prev prev.length() - 1 prev.length() prev.length prev 1 tmp.charAt(0) tmp.charAt tmp 0 {
				System.out.println("No");
				return;
			} System.out.println("No") System.out.println System.out System System.out "No" return; set.add(tmp) set.add set tmp prev = tmp prev tmp 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();
		HashSet<String> set = new HashSet<String>();

		String prev = sc.next();
		set.add(prev);
		for(int i = 1; i < n; i++){
			String tmp = sc.next();

			if(set.contains(tmp) || prev.charAt(prev.length() - 1) != tmp.charAt(0)){
				System.out.println("No");
				return;
			}
			set.add(tmp);
			prev = tmp;
		}
	System.out.println("Yes");
	}
} public class Main 
{
  	public static void main(String[] args) 
    {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		HashSet<String> set = new HashSet<String>();

		String prev = sc.next();
		set.add(prev);
		for(int i = 1; i < n; i++){
			String tmp = sc.next();

			if(set.contains(tmp) || prev.charAt(prev.length() - 1) != tmp.charAt(0)){
				System.out.println("No");
				return;
			}
			set.add(tmp);
			prev = tmp;
		}
	System.out.println("Yes");
	}
} Main
import java.util.*;

public class Main 
{
  	public static void main(String[] args) 
    {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		HashSet<String> set = new HashSet<String>();

		String prev = sc.next();
		set.add(prev);
		for(int i = 1; i < n; i++){
			String tmp = sc.next();

			if(set.contains(tmp) || prev.charAt(prev.length() - 1) != tmp.charAt(0)){
				System.out.println("No");
				return;
			}
			set.add(tmp);
			prev = tmp;
		}
	System.out.println("Yes");
	}
}
