import java.util.Scanner;

public class Main
{
	public static void main(String args[])
	{
		Scanner sc = new Scanner(System.in);
		int n;
		n=sc.nextInt();
		String words[] = new String[n];
		for(int i=0;i<n;i++)
			words[i]=sc.next();
		int flag=0;
		/*String aa ="aaj";
		System.out.println(words[1].matches(aa));*/
		for(int i=0;i<n-1;i++)
		{
			for(int j=i+1;j<n;j++)
			{
				if(words[i].matches(words[j]))
				{
					flag=1;
					break;
				}
			}
		}
		if(flag==0)
		{
			for(int i=1;i<n;i++)
			{
				if((words[i-1].charAt(words[i-1].length()-1))==(words[i].charAt(0)))
				{
					
				}
				else
				{
					flag=1;
					break;
				}
			}
		}
		if(flag==0)
			System.out.println("Yes");
		else
			System.out.println("No");
	}
} import java.util.Scanner; Scanner java.util public class Main
{
	public static void main(String args[])
	{
		Scanner sc = new Scanner(System.in);
		int n;
		n=sc.nextInt();
		String words[] = new String[n];
		for(int i=0;i<n;i++)
			words[i]=sc.next();
		int flag=0;
		/*String aa ="aaj";
		System.out.println(words[1].matches(aa));*/
		for(int i=0;i<n-1;i++)
		{
			for(int j=i+1;j<n;j++)
			{
				if(words[i].matches(words[j]))
				{
					flag=1;
					break;
				}
			}
		}
		if(flag==0)
		{
			for(int i=1;i<n;i++)
			{
				if((words[i-1].charAt(words[i-1].length()-1))==(words[i].charAt(0)))
				{
					
				}
				else
				{
					flag=1;
					break;
				}
			}
		}
		if(flag==0)
			System.out.println("Yes");
		else
			System.out.println("No");
	}
} Main public static void main(String args[])
	{
		Scanner sc = new Scanner(System.in);
		int n;
		n=sc.nextInt();
		String words[] = new String[n];
		for(int i=0;i<n;i++)
			words[i]=sc.next();
		int flag=0;
		/*String aa ="aaj";
		System.out.println(words[1].matches(aa));*/
		for(int i=0;i<n-1;i++)
		{
			for(int j=i+1;j<n;j++)
			{
				if(words[i].matches(words[j]))
				{
					flag=1;
					break;
				}
			}
		}
		if(flag==0)
		{
			for(int i=1;i<n;i++)
			{
				if((words[i-1].charAt(words[i-1].length()-1))==(words[i].charAt(0)))
				{
					
				}
				else
				{
					flag=1;
					break;
				}
			}
		}
		if(flag==0)
			System.out.println("Yes");
		else
			System.out.println("No");
	} main {
		Scanner sc = new Scanner(System.in);
		int n;
		n=sc.nextInt();
		String words[] = new String[n];
		for(int i=0;i<n;i++)
			words[i]=sc.next();
		int flag=0;
		/*String aa ="aaj";
		System.out.println(words[1].matches(aa));*/
		for(int i=0;i<n-1;i++)
		{
			for(int j=i+1;j<n;j++)
			{
				if(words[i].matches(words[j]))
				{
					flag=1;
					break;
				}
			}
		}
		if(flag==0)
		{
			for(int i=1;i<n;i++)
			{
				if((words[i-1].charAt(words[i-1].length()-1))==(words[i].charAt(0)))
				{
					
				}
				else
				{
					flag=1;
					break;
				}
			}
		}
		if(flag==0)
			System.out.println("Yes");
		else
			System.out.println("No");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n; n n=sc.nextInt() n sc.nextInt() sc.nextInt sc String words[] = new String[n]; words new String[n] n for(int i=0;i<n;i++)
			words[i]=sc.next(); int i=0; int i=0; i 0 i<n i n i++ i++ i words[i]=sc.next(); words[i]=sc.next() words[i] words i sc.next() sc.next sc int flag=0; flag 0 for(int i=0;i<n-1;i++)
		{
			for(int j=i+1;j<n;j++)
			{
				if(words[i].matches(words[j]))
				{
					flag=1;
					break;
				}
			}
		} int i=0; int i=0; i 0 i<n-1 i n-1 n 1 i++ i++ i {
			for(int j=i+1;j<n;j++)
			{
				if(words[i].matches(words[j]))
				{
					flag=1;
					break;
				}
			}
		} {
			for(int j=i+1;j<n;j++)
			{
				if(words[i].matches(words[j]))
				{
					flag=1;
					break;
				}
			}
		} for(int j=i+1;j<n;j++)
			{
				if(words[i].matches(words[j]))
				{
					flag=1;
					break;
				}
			} int j=i+1; int j=i+1; j i+1 i 1 j<n j n j++ j++ j {
				if(words[i].matches(words[j]))
				{
					flag=1;
					break;
				}
			} {
				if(words[i].matches(words[j]))
				{
					flag=1;
					break;
				}
			} if(words[i].matches(words[j]))
				{
					flag=1;
					break;
				} words[i].matches(words[j]) words[i].matches words[i] words i words[j] words j {
					flag=1;
					break;
				} flag=1 flag 1 break; if(flag==0)
		{
			for(int i=1;i<n;i++)
			{
				if((words[i-1].charAt(words[i-1].length()-1))==(words[i].charAt(0)))
				{
					
				}
				else
				{
					flag=1;
					break;
				}
			}
		} flag==0 flag 0 {
			for(int i=1;i<n;i++)
			{
				if((words[i-1].charAt(words[i-1].length()-1))==(words[i].charAt(0)))
				{
					
				}
				else
				{
					flag=1;
					break;
				}
			}
		} for(int i=1;i<n;i++)
			{
				if((words[i-1].charAt(words[i-1].length()-1))==(words[i].charAt(0)))
				{
					
				}
				else
				{
					flag=1;
					break;
				}
			} int i=1; int i=1; i 1 i<n i n i++ i++ i {
				if((words[i-1].charAt(words[i-1].length()-1))==(words[i].charAt(0)))
				{
					
				}
				else
				{
					flag=1;
					break;
				}
			} {
				if((words[i-1].charAt(words[i-1].length()-1))==(words[i].charAt(0)))
				{
					
				}
				else
				{
					flag=1;
					break;
				}
			} if((words[i-1].charAt(words[i-1].length()-1))==(words[i].charAt(0)))
				{
					
				}
				else
				{
					flag=1;
					break;
				} (words[i-1].charAt(words[i-1].length()-1))==(words[i].charAt(0)) (words[i-1].charAt(words[i-1].length()-1)) words[i-1].charAt words[i-1] words i-1 i 1 words[i-1].length()-1 words[i-1].length() words[i-1].length words[i-1] words i-1 i 1 1 (words[i].charAt(0)) words[i].charAt words[i] words i 0 {
					
				} {
					flag=1;
					break;
				} flag=1 flag 1 break; if(flag==0)
			System.out.println("Yes");
		else
			System.out.println("No"); flag==0 flag 0 System.out.println("Yes") System.out.println System.out System System.out "Yes" System.out.println("No") System.out.println System.out System System.out "No" String args[] args public class Main
{
	public static void main(String args[])
	{
		Scanner sc = new Scanner(System.in);
		int n;
		n=sc.nextInt();
		String words[] = new String[n];
		for(int i=0;i<n;i++)
			words[i]=sc.next();
		int flag=0;
		/*String aa ="aaj";
		System.out.println(words[1].matches(aa));*/
		for(int i=0;i<n-1;i++)
		{
			for(int j=i+1;j<n;j++)
			{
				if(words[i].matches(words[j]))
				{
					flag=1;
					break;
				}
			}
		}
		if(flag==0)
		{
			for(int i=1;i<n;i++)
			{
				if((words[i-1].charAt(words[i-1].length()-1))==(words[i].charAt(0)))
				{
					
				}
				else
				{
					flag=1;
					break;
				}
			}
		}
		if(flag==0)
			System.out.println("Yes");
		else
			System.out.println("No");
	}
} public class Main
{
	public static void main(String args[])
	{
		Scanner sc = new Scanner(System.in);
		int n;
		n=sc.nextInt();
		String words[] = new String[n];
		for(int i=0;i<n;i++)
			words[i]=sc.next();
		int flag=0;
		/*String aa ="aaj";
		System.out.println(words[1].matches(aa));*/
		for(int i=0;i<n-1;i++)
		{
			for(int j=i+1;j<n;j++)
			{
				if(words[i].matches(words[j]))
				{
					flag=1;
					break;
				}
			}
		}
		if(flag==0)
		{
			for(int i=1;i<n;i++)
			{
				if((words[i-1].charAt(words[i-1].length()-1))==(words[i].charAt(0)))
				{
					
				}
				else
				{
					flag=1;
					break;
				}
			}
		}
		if(flag==0)
			System.out.println("Yes");
		else
			System.out.println("No");
	}
} Main
import java.util.Scanner;

public class Main
{
	public static void main(String args[])
	{
		Scanner sc = new Scanner(System.in);
		int n;
		n=sc.nextInt();
		String words[] = new String[n];
		for(int i=0;i<n;i++)
			words[i]=sc.next();
		int flag=0;
		/*String aa ="aaj";
		System.out.println(words[1].matches(aa));*/
		for(int i=0;i<n-1;i++)
		{
			for(int j=i+1;j<n;j++)
			{
				if(words[i].matches(words[j]))
				{
					flag=1;
					break;
				}
			}
		}
		if(flag==0)
		{
			for(int i=1;i<n;i++)
			{
				if((words[i-1].charAt(words[i-1].length()-1))==(words[i].charAt(0)))
				{
					
				}
				else
				{
					flag=1;
					break;
				}
			}
		}
		if(flag==0)
			System.out.println("Yes");
		else
			System.out.println("No");
	}
}
