import java.util.*;

public class Main{

	public static void main(String[] args){

		Scanner sc = new Scanner(System.in);
        int N  = sc.nextInt();
        String[] list = new String[N];
        String ans = "No";
       
        for(int i = 0; i < N; i++){
           list[i] = sc.next();
        }
      
        for(int i = 1; i < N; i++){
          char[] first = list[i-1].toCharArray();
          char[] second = list[i].toCharArray();
          if(first[first.length-1] != second[0]){
            System.out.println("No");
            return;  
          }else{
            continue;
          }
        }
      
        for(int i = 0; i < N; i++){
          String a = list[i];
          for(int j = i+1; j < N; j++){
            String b = list[j];
            if(a.equals(b)){
              System.out.println("No");
              return;
            }else{
              continue;
            }
          }
        }
      
       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();
        String[] list = new String[N];
        String ans = "No";
       
        for(int i = 0; i < N; i++){
           list[i] = sc.next();
        }
      
        for(int i = 1; i < N; i++){
          char[] first = list[i-1].toCharArray();
          char[] second = list[i].toCharArray();
          if(first[first.length-1] != second[0]){
            System.out.println("No");
            return;  
          }else{
            continue;
          }
        }
      
        for(int i = 0; i < N; i++){
          String a = list[i];
          for(int j = i+1; j < N; j++){
            String b = list[j];
            if(a.equals(b)){
              System.out.println("No");
              return;
            }else{
              continue;
            }
          }
        }
      
       System.out.println("Yes");
	}

} Main public static void main(String[] args){

		Scanner sc = new Scanner(System.in);
        int N  = sc.nextInt();
        String[] list = new String[N];
        String ans = "No";
       
        for(int i = 0; i < N; i++){
           list[i] = sc.next();
        }
      
        for(int i = 1; i < N; i++){
          char[] first = list[i-1].toCharArray();
          char[] second = list[i].toCharArray();
          if(first[first.length-1] != second[0]){
            System.out.println("No");
            return;  
          }else{
            continue;
          }
        }
      
        for(int i = 0; i < N; i++){
          String a = list[i];
          for(int j = i+1; j < N; j++){
            String b = list[j];
            if(a.equals(b)){
              System.out.println("No");
              return;
            }else{
              continue;
            }
          }
        }
      
       System.out.println("Yes");
	} main {

		Scanner sc = new Scanner(System.in);
        int N  = sc.nextInt();
        String[] list = new String[N];
        String ans = "No";
       
        for(int i = 0; i < N; i++){
           list[i] = sc.next();
        }
      
        for(int i = 1; i < N; i++){
          char[] first = list[i-1].toCharArray();
          char[] second = list[i].toCharArray();
          if(first[first.length-1] != second[0]){
            System.out.println("No");
            return;  
          }else{
            continue;
          }
        }
      
        for(int i = 0; i < N; i++){
          String a = list[i];
          for(int j = i+1; j < N; j++){
            String b = list[j];
            if(a.equals(b)){
              System.out.println("No");
              return;
            }else{
              continue;
            }
          }
        }
      
       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 String[] list = new String[N]; list new String[N] N String ans = "No"; ans "No" for(int i = 0; i < N; i++){
           list[i] = sc.next();
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
           list[i] = sc.next();
        } {
           list[i] = sc.next();
        } list[i] = sc.next() list[i] list i sc.next() sc.next sc for(int i = 1; i < N; i++){
          char[] first = list[i-1].toCharArray();
          char[] second = list[i].toCharArray();
          if(first[first.length-1] != second[0]){
            System.out.println("No");
            return;  
          }else{
            continue;
          }
        } int i = 1; int i = 1; i 1 i < N i N i++ i++ i {
          char[] first = list[i-1].toCharArray();
          char[] second = list[i].toCharArray();
          if(first[first.length-1] != second[0]){
            System.out.println("No");
            return;  
          }else{
            continue;
          }
        } {
          char[] first = list[i-1].toCharArray();
          char[] second = list[i].toCharArray();
          if(first[first.length-1] != second[0]){
            System.out.println("No");
            return;  
          }else{
            continue;
          }
        } char[] first = list[i-1].toCharArray(); first list[i-1].toCharArray() list[i-1].toCharArray list[i-1] list i-1 i 1 char[] second = list[i].toCharArray(); second list[i].toCharArray() list[i].toCharArray list[i] list i if(first[first.length-1] != second[0]){
            System.out.println("No");
            return;  
          }else{
            continue;
          } first[first.length-1] != second[0] first[first.length-1] first first.length-1 first.length first first.length 1 second[0] second 0 {
            System.out.println("No");
            return;  
          } System.out.println("No") System.out.println System.out System System.out "No" return; {
            continue;
          } continue; for(int i = 0; i < N; i++){
          String a = list[i];
          for(int j = i+1; j < N; j++){
            String b = list[j];
            if(a.equals(b)){
              System.out.println("No");
              return;
            }else{
              continue;
            }
          }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
          String a = list[i];
          for(int j = i+1; j < N; j++){
            String b = list[j];
            if(a.equals(b)){
              System.out.println("No");
              return;
            }else{
              continue;
            }
          }
        } {
          String a = list[i];
          for(int j = i+1; j < N; j++){
            String b = list[j];
            if(a.equals(b)){
              System.out.println("No");
              return;
            }else{
              continue;
            }
          }
        } String a = list[i]; a list[i] list i for(int j = i+1; j < N; j++){
            String b = list[j];
            if(a.equals(b)){
              System.out.println("No");
              return;
            }else{
              continue;
            }
          } int j = i+1; int j = i+1; j i+1 i 1 j < N j N j++ j++ j {
            String b = list[j];
            if(a.equals(b)){
              System.out.println("No");
              return;
            }else{
              continue;
            }
          } {
            String b = list[j];
            if(a.equals(b)){
              System.out.println("No");
              return;
            }else{
              continue;
            }
          } String b = list[j]; b list[j] list j if(a.equals(b)){
              System.out.println("No");
              return;
            }else{
              continue;
            } a.equals(b) a.equals a b {
              System.out.println("No");
              return;
            } System.out.println("No") System.out.println System.out System System.out "No" return; {
              continue;
            } continue; 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();
        String[] list = new String[N];
        String ans = "No";
       
        for(int i = 0; i < N; i++){
           list[i] = sc.next();
        }
      
        for(int i = 1; i < N; i++){
          char[] first = list[i-1].toCharArray();
          char[] second = list[i].toCharArray();
          if(first[first.length-1] != second[0]){
            System.out.println("No");
            return;  
          }else{
            continue;
          }
        }
      
        for(int i = 0; i < N; i++){
          String a = list[i];
          for(int j = i+1; j < N; j++){
            String b = list[j];
            if(a.equals(b)){
              System.out.println("No");
              return;
            }else{
              continue;
            }
          }
        }
      
       System.out.println("Yes");
	}

} public class Main{

	public static void main(String[] args){

		Scanner sc = new Scanner(System.in);
        int N  = sc.nextInt();
        String[] list = new String[N];
        String ans = "No";
       
        for(int i = 0; i < N; i++){
           list[i] = sc.next();
        }
      
        for(int i = 1; i < N; i++){
          char[] first = list[i-1].toCharArray();
          char[] second = list[i].toCharArray();
          if(first[first.length-1] != second[0]){
            System.out.println("No");
            return;  
          }else{
            continue;
          }
        }
      
        for(int i = 0; i < N; i++){
          String a = list[i];
          for(int j = i+1; j < N; j++){
            String b = list[j];
            if(a.equals(b)){
              System.out.println("No");
              return;
            }else{
              continue;
            }
          }
        }
      
       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();
        String[] list = new String[N];
        String ans = "No";
       
        for(int i = 0; i < N; i++){
           list[i] = sc.next();
        }
      
        for(int i = 1; i < N; i++){
          char[] first = list[i-1].toCharArray();
          char[] second = list[i].toCharArray();
          if(first[first.length-1] != second[0]){
            System.out.println("No");
            return;  
          }else{
            continue;
          }
        }
      
        for(int i = 0; i < N; i++){
          String a = list[i];
          for(int j = i+1; j < N; j++){
            String b = list[j];
            if(a.equals(b)){
              System.out.println("No");
              return;
            }else{
              continue;
            }
          }
        }
      
       System.out.println("Yes");
	}

}