import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int n = sc.nextInt();
        int count = 1;
        boolean ans = true;
        String front[] = new String[100];
        String back[] = new String[100];
      	String tmp,tmp2;
      
        
        List<String> list = new ArrayList<String>();
        tmp = sc.next();
        list.add(tmp);
        while(count < n){
          tmp2 = sc.next();
          list.add(tmp2);
          front = tmp.split("");
          back =  tmp2.split("");
          if(!back[0].equals(front[front.length - 1])){
            System.out.println("No");
            return;
          }
          
          ans = (list.size() == new HashSet<>(list).size());
          if(ans == false){
            System.out.println("No");
            return;
          }
          
          tmp = tmp2;
          count++;
        }
        
        
        
        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();
        int count = 1;
        boolean ans = true;
        String front[] = new String[100];
        String back[] = new String[100];
      	String tmp,tmp2;
      
        
        List<String> list = new ArrayList<String>();
        tmp = sc.next();
        list.add(tmp);
        while(count < n){
          tmp2 = sc.next();
          list.add(tmp2);
          front = tmp.split("");
          back =  tmp2.split("");
          if(!back[0].equals(front[front.length - 1])){
            System.out.println("No");
            return;
          }
          
          ans = (list.size() == new HashSet<>(list).size());
          if(ans == false){
            System.out.println("No");
            return;
          }
          
          tmp = tmp2;
          count++;
        }
        
        
        
        System.out.println("Yes");
    }
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int n = sc.nextInt();
        int count = 1;
        boolean ans = true;
        String front[] = new String[100];
        String back[] = new String[100];
      	String tmp,tmp2;
      
        
        List<String> list = new ArrayList<String>();
        tmp = sc.next();
        list.add(tmp);
        while(count < n){
          tmp2 = sc.next();
          list.add(tmp2);
          front = tmp.split("");
          back =  tmp2.split("");
          if(!back[0].equals(front[front.length - 1])){
            System.out.println("No");
            return;
          }
          
          ans = (list.size() == new HashSet<>(list).size());
          if(ans == false){
            System.out.println("No");
            return;
          }
          
          tmp = tmp2;
          count++;
        }
        
        
        
        System.out.println("Yes");
    } main {
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int n = sc.nextInt();
        int count = 1;
        boolean ans = true;
        String front[] = new String[100];
        String back[] = new String[100];
      	String tmp,tmp2;
      
        
        List<String> list = new ArrayList<String>();
        tmp = sc.next();
        list.add(tmp);
        while(count < n){
          tmp2 = sc.next();
          list.add(tmp2);
          front = tmp.split("");
          back =  tmp2.split("");
          if(!back[0].equals(front[front.length - 1])){
            System.out.println("No");
            return;
          }
          
          ans = (list.size() == new HashSet<>(list).size());
          if(ans == false){
            System.out.println("No");
            return;
          }
          
          tmp = tmp2;
          count++;
        }
        
        
        
        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 int count = 1; count 1 boolean ans = true; ans true String front[] = new String[100]; front new String[100] 100 String back[] = new String[100]; back new String[100] 100 String tmp tmp tmp2; tmp2 List<String> list = new ArrayList<String>(); list new ArrayList<String>() tmp = sc.next() tmp sc.next() sc.next sc list.add(tmp) list.add list tmp while(count < n){
          tmp2 = sc.next();
          list.add(tmp2);
          front = tmp.split("");
          back =  tmp2.split("");
          if(!back[0].equals(front[front.length - 1])){
            System.out.println("No");
            return;
          }
          
          ans = (list.size() == new HashSet<>(list).size());
          if(ans == false){
            System.out.println("No");
            return;
          }
          
          tmp = tmp2;
          count++;
        } count < n count n {
          tmp2 = sc.next();
          list.add(tmp2);
          front = tmp.split("");
          back =  tmp2.split("");
          if(!back[0].equals(front[front.length - 1])){
            System.out.println("No");
            return;
          }
          
          ans = (list.size() == new HashSet<>(list).size());
          if(ans == false){
            System.out.println("No");
            return;
          }
          
          tmp = tmp2;
          count++;
        } tmp2 = sc.next() tmp2 sc.next() sc.next sc list.add(tmp2) list.add list tmp2 front = tmp.split("") front tmp.split("") tmp.split tmp "" back =  tmp2.split("") back tmp2.split("") tmp2.split tmp2 "" if(!back[0].equals(front[front.length - 1])){
            System.out.println("No");
            return;
          } !back[0].equals(front[front.length - 1]) back[0].equals(front[front.length - 1]) back[0].equals back[0] back 0 front[front.length - 1] front front.length - 1 front.length front front.length 1 {
            System.out.println("No");
            return;
          } System.out.println("No") System.out.println System.out System System.out "No" return; ans = (list.size() == new HashSet<>(list).size()) ans (list.size() == new HashSet<>(list).size()) list.size() list.size list new HashSet<>(list).size() new HashSet<>(list).size new HashSet<>(list) if(ans == false){
            System.out.println("No");
            return;
          } ans == false ans false {
            System.out.println("No");
            return;
          } System.out.println("No") System.out.println System.out System System.out "No" return; tmp = tmp2 tmp tmp2 count++ count 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();
        int count = 1;
        boolean ans = true;
        String front[] = new String[100];
        String back[] = new String[100];
      	String tmp,tmp2;
      
        
        List<String> list = new ArrayList<String>();
        tmp = sc.next();
        list.add(tmp);
        while(count < n){
          tmp2 = sc.next();
          list.add(tmp2);
          front = tmp.split("");
          back =  tmp2.split("");
          if(!back[0].equals(front[front.length - 1])){
            System.out.println("No");
            return;
          }
          
          ans = (list.size() == new HashSet<>(list).size());
          if(ans == false){
            System.out.println("No");
            return;
          }
          
          tmp = tmp2;
          count++;
        }
        
        
        
        System.out.println("Yes");
    }
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int n = sc.nextInt();
        int count = 1;
        boolean ans = true;
        String front[] = new String[100];
        String back[] = new String[100];
      	String tmp,tmp2;
      
        
        List<String> list = new ArrayList<String>();
        tmp = sc.next();
        list.add(tmp);
        while(count < n){
          tmp2 = sc.next();
          list.add(tmp2);
          front = tmp.split("");
          back =  tmp2.split("");
          if(!back[0].equals(front[front.length - 1])){
            System.out.println("No");
            return;
          }
          
          ans = (list.size() == new HashSet<>(list).size());
          if(ans == false){
            System.out.println("No");
            return;
          }
          
          tmp = tmp2;
          count++;
        }
        
        
        
        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();
        int count = 1;
        boolean ans = true;
        String front[] = new String[100];
        String back[] = new String[100];
      	String tmp,tmp2;
      
        
        List<String> list = new ArrayList<String>();
        tmp = sc.next();
        list.add(tmp);
        while(count < n){
          tmp2 = sc.next();
          list.add(tmp2);
          front = tmp.split("");
          back =  tmp2.split("");
          if(!back[0].equals(front[front.length - 1])){
            System.out.println("No");
            return;
          }
          
          ans = (list.size() == new HashSet<>(list).size());
          if(ans == false){
            System.out.println("No");
            return;
          }
          
          tmp = tmp2;
          count++;
        }
        
        
        
        System.out.println("Yes");
    }
}