import java.util.*;
public class Main {
	public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.nextLine());
    String[] code = new String[n];
    boolean flg = false;
    String ans = "Yes";
    for(int i=0;i<n;i++){
        code[i] = sc.nextLine();
        if(i != 0 && !code[i].substring(0, 1).equals(code[i-1].substring(code[i-1].length() - 1, code[i-1].length()))){
            ans = "No";
            break;
        }
        for(int j=0;j<i;j++){
            if(code[i].equals(code[j])){
              ans = "No";
                flg = true;
                break;
            }
        }
        if(flg){
            break;
        }
    }
    System.out.println(ans);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.nextLine());
    String[] code = new String[n];
    boolean flg = false;
    String ans = "Yes";
    for(int i=0;i<n;i++){
        code[i] = sc.nextLine();
        if(i != 0 && !code[i].substring(0, 1).equals(code[i-1].substring(code[i-1].length() - 1, code[i-1].length()))){
            ans = "No";
            break;
        }
        for(int j=0;j<i;j++){
            if(code[i].equals(code[j])){
              ans = "No";
                flg = true;
                break;
            }
        }
        if(flg){
            break;
        }
    }
    System.out.println(ans);
	}
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.nextLine());
    String[] code = new String[n];
    boolean flg = false;
    String ans = "Yes";
    for(int i=0;i<n;i++){
        code[i] = sc.nextLine();
        if(i != 0 && !code[i].substring(0, 1).equals(code[i-1].substring(code[i-1].length() - 1, code[i-1].length()))){
            ans = "No";
            break;
        }
        for(int j=0;j<i;j++){
            if(code[i].equals(code[j])){
              ans = "No";
                flg = true;
                break;
            }
        }
        if(flg){
            break;
        }
    }
    System.out.println(ans);
	} main {
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.nextLine());
    String[] code = new String[n];
    boolean flg = false;
    String ans = "Yes";
    for(int i=0;i<n;i++){
        code[i] = sc.nextLine();
        if(i != 0 && !code[i].substring(0, 1).equals(code[i-1].substring(code[i-1].length() - 1, code[i-1].length()))){
            ans = "No";
            break;
        }
        for(int j=0;j<i;j++){
            if(code[i].equals(code[j])){
              ans = "No";
                flg = true;
                break;
            }
        }
        if(flg){
            break;
        }
    }
    System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.nextLine()); n Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc String[] code = new String[n]; code new String[n] n boolean flg = false; flg false String ans = "Yes"; ans "Yes" for(int i=0;i<n;i++){
        code[i] = sc.nextLine();
        if(i != 0 && !code[i].substring(0, 1).equals(code[i-1].substring(code[i-1].length() - 1, code[i-1].length()))){
            ans = "No";
            break;
        }
        for(int j=0;j<i;j++){
            if(code[i].equals(code[j])){
              ans = "No";
                flg = true;
                break;
            }
        }
        if(flg){
            break;
        }
    } int i=0; int i=0; i 0 i<n i n i++ i++ i {
        code[i] = sc.nextLine();
        if(i != 0 && !code[i].substring(0, 1).equals(code[i-1].substring(code[i-1].length() - 1, code[i-1].length()))){
            ans = "No";
            break;
        }
        for(int j=0;j<i;j++){
            if(code[i].equals(code[j])){
              ans = "No";
                flg = true;
                break;
            }
        }
        if(flg){
            break;
        }
    } {
        code[i] = sc.nextLine();
        if(i != 0 && !code[i].substring(0, 1).equals(code[i-1].substring(code[i-1].length() - 1, code[i-1].length()))){
            ans = "No";
            break;
        }
        for(int j=0;j<i;j++){
            if(code[i].equals(code[j])){
              ans = "No";
                flg = true;
                break;
            }
        }
        if(flg){
            break;
        }
    } code[i] = sc.nextLine() code[i] code i sc.nextLine() sc.nextLine sc if(i != 0 && !code[i].substring(0, 1).equals(code[i-1].substring(code[i-1].length() - 1, code[i-1].length()))){
            ans = "No";
            break;
        } i != 0 && !code[i].substring(0, 1).equals(code[i-1].substring(code[i-1].length() - 1, code[i-1].length())) i != 0 i 0 !code[i].substring(0, 1).equals(code[i-1].substring(code[i-1].length() - 1, code[i-1].length())) code[i].substring(0, 1).equals(code[i-1].substring(code[i-1].length() - 1, code[i-1].length())) code[i].substring(0, 1).equals code[i].substring(0, 1) code[i].substring code[i] code i 0 1 code[i-1].substring(code[i-1].length() - 1, code[i-1].length()) code[i-1].substring code[i-1] code i-1 i 1 code[i-1].length() - 1 code[i-1].length() code[i-1].length code[i-1] code i-1 i 1 1 code[i-1].length() code[i-1].length code[i-1] code i-1 i 1 {
            ans = "No";
            break;
        } ans = "No" ans "No" break; for(int j=0;j<i;j++){
            if(code[i].equals(code[j])){
              ans = "No";
                flg = true;
                break;
            }
        } int j=0; int j=0; j 0 j<i j i j++ j++ j {
            if(code[i].equals(code[j])){
              ans = "No";
                flg = true;
                break;
            }
        } {
            if(code[i].equals(code[j])){
              ans = "No";
                flg = true;
                break;
            }
        } if(code[i].equals(code[j])){
              ans = "No";
                flg = true;
                break;
            } code[i].equals(code[j]) code[i].equals code[i] code i code[j] code j {
              ans = "No";
                flg = true;
                break;
            } ans = "No" ans "No" flg = true flg true break; if(flg){
            break;
        } flg {
            break;
        } break; System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.nextLine());
    String[] code = new String[n];
    boolean flg = false;
    String ans = "Yes";
    for(int i=0;i<n;i++){
        code[i] = sc.nextLine();
        if(i != 0 && !code[i].substring(0, 1).equals(code[i-1].substring(code[i-1].length() - 1, code[i-1].length()))){
            ans = "No";
            break;
        }
        for(int j=0;j<i;j++){
            if(code[i].equals(code[j])){
              ans = "No";
                flg = true;
                break;
            }
        }
        if(flg){
            break;
        }
    }
    System.out.println(ans);
	}
} public class Main {
	public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.nextLine());
    String[] code = new String[n];
    boolean flg = false;
    String ans = "Yes";
    for(int i=0;i<n;i++){
        code[i] = sc.nextLine();
        if(i != 0 && !code[i].substring(0, 1).equals(code[i-1].substring(code[i-1].length() - 1, code[i-1].length()))){
            ans = "No";
            break;
        }
        for(int j=0;j<i;j++){
            if(code[i].equals(code[j])){
              ans = "No";
                flg = true;
                break;
            }
        }
        if(flg){
            break;
        }
    }
    System.out.println(ans);
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.nextLine());
    String[] code = new String[n];
    boolean flg = false;
    String ans = "Yes";
    for(int i=0;i<n;i++){
        code[i] = sc.nextLine();
        if(i != 0 && !code[i].substring(0, 1).equals(code[i-1].substring(code[i-1].length() - 1, code[i-1].length()))){
            ans = "No";
            break;
        }
        for(int j=0;j<i;j++){
            if(code[i].equals(code[j])){
              ans = "No";
                flg = true;
                break;
            }
        }
        if(flg){
            break;
        }
    }
    System.out.println(ans);
	}
}