/*package whatever //do not write package name here */

import java.util.*;

public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		LinkedHashSet<String> lhs = new LinkedHashSet<>();
		LinkedList<String> ll = new LinkedList<>();
		int n = sc.nextInt();
		sc.nextLine();
		int f = 0;
		while(n-- != 0)
		{
		    String s = sc.nextLine();
		    if(lhs.contains(s))
		    f = 1;
		    lhs.add(s);
		}
		if(f == 1)
		System.out.print("No");
		else
		{
		    ll.addAll(lhs);
		    for(int i = 0;i < ll.size() - 1;i++)
		    {
		        String s1 = ll.get(i);
		        String s2 = ll.get(i + 1);
		        if(s1.charAt(s1.length() - 1) != s2.charAt(0))
		        {
		        f = 1;
		        break;
		        }
		    }
		    if(f == 1)
		    System.out.print("No");
		    else
		    System.out.print("Yes");
		}
	}
} import java.util.*; util.* java public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		LinkedHashSet<String> lhs = new LinkedHashSet<>();
		LinkedList<String> ll = new LinkedList<>();
		int n = sc.nextInt();
		sc.nextLine();
		int f = 0;
		while(n-- != 0)
		{
		    String s = sc.nextLine();
		    if(lhs.contains(s))
		    f = 1;
		    lhs.add(s);
		}
		if(f == 1)
		System.out.print("No");
		else
		{
		    ll.addAll(lhs);
		    for(int i = 0;i < ll.size() - 1;i++)
		    {
		        String s1 = ll.get(i);
		        String s2 = ll.get(i + 1);
		        if(s1.charAt(s1.length() - 1) != s2.charAt(0))
		        {
		        f = 1;
		        break;
		        }
		    }
		    if(f == 1)
		    System.out.print("No");
		    else
		    System.out.print("Yes");
		}
	}
} Main public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		LinkedHashSet<String> lhs = new LinkedHashSet<>();
		LinkedList<String> ll = new LinkedList<>();
		int n = sc.nextInt();
		sc.nextLine();
		int f = 0;
		while(n-- != 0)
		{
		    String s = sc.nextLine();
		    if(lhs.contains(s))
		    f = 1;
		    lhs.add(s);
		}
		if(f == 1)
		System.out.print("No");
		else
		{
		    ll.addAll(lhs);
		    for(int i = 0;i < ll.size() - 1;i++)
		    {
		        String s1 = ll.get(i);
		        String s2 = ll.get(i + 1);
		        if(s1.charAt(s1.length() - 1) != s2.charAt(0))
		        {
		        f = 1;
		        break;
		        }
		    }
		    if(f == 1)
		    System.out.print("No");
		    else
		    System.out.print("Yes");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		LinkedHashSet<String> lhs = new LinkedHashSet<>();
		LinkedList<String> ll = new LinkedList<>();
		int n = sc.nextInt();
		sc.nextLine();
		int f = 0;
		while(n-- != 0)
		{
		    String s = sc.nextLine();
		    if(lhs.contains(s))
		    f = 1;
		    lhs.add(s);
		}
		if(f == 1)
		System.out.print("No");
		else
		{
		    ll.addAll(lhs);
		    for(int i = 0;i < ll.size() - 1;i++)
		    {
		        String s1 = ll.get(i);
		        String s2 = ll.get(i + 1);
		        if(s1.charAt(s1.length() - 1) != s2.charAt(0))
		        {
		        f = 1;
		        break;
		        }
		    }
		    if(f == 1)
		    System.out.print("No");
		    else
		    System.out.print("Yes");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) LinkedHashSet<String> lhs = new LinkedHashSet<>(); lhs new LinkedHashSet<>() LinkedList<String> ll = new LinkedList<>(); ll new LinkedList<>() int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc sc.nextLine() sc.nextLine sc int f = 0; f 0 while(n-- != 0)
		{
		    String s = sc.nextLine();
		    if(lhs.contains(s))
		    f = 1;
		    lhs.add(s);
		} n-- != 0 n-- n 0 {
		    String s = sc.nextLine();
		    if(lhs.contains(s))
		    f = 1;
		    lhs.add(s);
		} String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc if(lhs.contains(s))
		    f = 1; lhs.contains(s) lhs.contains lhs s f = 1 f 1 lhs.add(s) lhs.add lhs s if(f == 1)
		System.out.print("No");
		else
		{
		    ll.addAll(lhs);
		    for(int i = 0;i < ll.size() - 1;i++)
		    {
		        String s1 = ll.get(i);
		        String s2 = ll.get(i + 1);
		        if(s1.charAt(s1.length() - 1) != s2.charAt(0))
		        {
		        f = 1;
		        break;
		        }
		    }
		    if(f == 1)
		    System.out.print("No");
		    else
		    System.out.print("Yes");
		} f == 1 f 1 System.out.print("No") System.out.print System.out System System.out "No" {
		    ll.addAll(lhs);
		    for(int i = 0;i < ll.size() - 1;i++)
		    {
		        String s1 = ll.get(i);
		        String s2 = ll.get(i + 1);
		        if(s1.charAt(s1.length() - 1) != s2.charAt(0))
		        {
		        f = 1;
		        break;
		        }
		    }
		    if(f == 1)
		    System.out.print("No");
		    else
		    System.out.print("Yes");
		} ll.addAll(lhs) ll.addAll ll lhs for(int i = 0;i < ll.size() - 1;i++)
		    {
		        String s1 = ll.get(i);
		        String s2 = ll.get(i + 1);
		        if(s1.charAt(s1.length() - 1) != s2.charAt(0))
		        {
		        f = 1;
		        break;
		        }
		    } int i = 0; int i = 0; i 0 i < ll.size() - 1 i ll.size() - 1 ll.size() ll.size ll 1 i++ i++ i {
		        String s1 = ll.get(i);
		        String s2 = ll.get(i + 1);
		        if(s1.charAt(s1.length() - 1) != s2.charAt(0))
		        {
		        f = 1;
		        break;
		        }
		    } {
		        String s1 = ll.get(i);
		        String s2 = ll.get(i + 1);
		        if(s1.charAt(s1.length() - 1) != s2.charAt(0))
		        {
		        f = 1;
		        break;
		        }
		    } String s1 = ll.get(i); s1 ll.get(i) ll.get ll i String s2 = ll.get(i + 1); s2 ll.get(i + 1) ll.get ll i + 1 i 1 if(s1.charAt(s1.length() - 1) != s2.charAt(0))
		        {
		        f = 1;
		        break;
		        } s1.charAt(s1.length() - 1) != s2.charAt(0) s1.charAt(s1.length() - 1) s1.charAt s1 s1.length() - 1 s1.length() s1.length s1 1 s2.charAt(0) s2.charAt s2 0 {
		        f = 1;
		        break;
		        } f = 1 f 1 break; if(f == 1)
		    System.out.print("No");
		    else
		    System.out.print("Yes"); f == 1 f 1 System.out.print("No") System.out.print System.out System System.out "No" System.out.print("Yes") System.out.print System.out System System.out "Yes" String[] args args public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		LinkedHashSet<String> lhs = new LinkedHashSet<>();
		LinkedList<String> ll = new LinkedList<>();
		int n = sc.nextInt();
		sc.nextLine();
		int f = 0;
		while(n-- != 0)
		{
		    String s = sc.nextLine();
		    if(lhs.contains(s))
		    f = 1;
		    lhs.add(s);
		}
		if(f == 1)
		System.out.print("No");
		else
		{
		    ll.addAll(lhs);
		    for(int i = 0;i < ll.size() - 1;i++)
		    {
		        String s1 = ll.get(i);
		        String s2 = ll.get(i + 1);
		        if(s1.charAt(s1.length() - 1) != s2.charAt(0))
		        {
		        f = 1;
		        break;
		        }
		    }
		    if(f == 1)
		    System.out.print("No");
		    else
		    System.out.print("Yes");
		}
	}
} public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		LinkedHashSet<String> lhs = new LinkedHashSet<>();
		LinkedList<String> ll = new LinkedList<>();
		int n = sc.nextInt();
		sc.nextLine();
		int f = 0;
		while(n-- != 0)
		{
		    String s = sc.nextLine();
		    if(lhs.contains(s))
		    f = 1;
		    lhs.add(s);
		}
		if(f == 1)
		System.out.print("No");
		else
		{
		    ll.addAll(lhs);
		    for(int i = 0;i < ll.size() - 1;i++)
		    {
		        String s1 = ll.get(i);
		        String s2 = ll.get(i + 1);
		        if(s1.charAt(s1.length() - 1) != s2.charAt(0))
		        {
		        f = 1;
		        break;
		        }
		    }
		    if(f == 1)
		    System.out.print("No");
		    else
		    System.out.print("Yes");
		}
	}
} Main
/*package whatever //do not write package name here */

import java.util.*;

public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		LinkedHashSet<String> lhs = new LinkedHashSet<>();
		LinkedList<String> ll = new LinkedList<>();
		int n = sc.nextInt();
		sc.nextLine();
		int f = 0;
		while(n-- != 0)
		{
		    String s = sc.nextLine();
		    if(lhs.contains(s))
		    f = 1;
		    lhs.add(s);
		}
		if(f == 1)
		System.out.print("No");
		else
		{
		    ll.addAll(lhs);
		    for(int i = 0;i < ll.size() - 1;i++)
		    {
		        String s1 = ll.get(i);
		        String s2 = ll.get(i + 1);
		        if(s1.charAt(s1.length() - 1) != s2.charAt(0))
		        {
		        f = 1;
		        break;
		        }
		    }
		    if(f == 1)
		    System.out.print("No");
		    else
		    System.out.print("Yes");
		}
	}
}