import java.io.*;
import java.util.*;
class Program{
    
}
class Main{
    public static void main(String[] args) {
        Program obj = new Program();
        Scanner in = new Scanner(System.in);
        int N = Integer.parseInt(in.nextLine());
        ArrayList<String> S = new ArrayList<String>();
        for(int i=0;i<N;i++) S.add(in.nextLine());
        boolean flag = true;
        for(int i = 0;i<S.size()-1;i++){
            if (S.get(i).charAt( S.get(i).length()-1 ) != S.get(i+1).charAt(0) ){
                flag = false; break;
            }
        }
        //System.out.println(new HashSet<String>(S).size());
        if (flag==true && new HashSet<String>(S).size()==N) System.out.println("Yes");
        else System.out.println("No");    
    }
} import java.io.*; io.* java import java.util.*; util.* java class Program{
    
} Program class Main{
    public static void main(String[] args) {
        Program obj = new Program();
        Scanner in = new Scanner(System.in);
        int N = Integer.parseInt(in.nextLine());
        ArrayList<String> S = new ArrayList<String>();
        for(int i=0;i<N;i++) S.add(in.nextLine());
        boolean flag = true;
        for(int i = 0;i<S.size()-1;i++){
            if (S.get(i).charAt( S.get(i).length()-1 ) != S.get(i+1).charAt(0) ){
                flag = false; break;
            }
        }
        //System.out.println(new HashSet<String>(S).size());
        if (flag==true && new HashSet<String>(S).size()==N) System.out.println("Yes");
        else System.out.println("No");    
    }
} Main public static void main(String[] args) {
        Program obj = new Program();
        Scanner in = new Scanner(System.in);
        int N = Integer.parseInt(in.nextLine());
        ArrayList<String> S = new ArrayList<String>();
        for(int i=0;i<N;i++) S.add(in.nextLine());
        boolean flag = true;
        for(int i = 0;i<S.size()-1;i++){
            if (S.get(i).charAt( S.get(i).length()-1 ) != S.get(i+1).charAt(0) ){
                flag = false; break;
            }
        }
        //System.out.println(new HashSet<String>(S).size());
        if (flag==true && new HashSet<String>(S).size()==N) System.out.println("Yes");
        else System.out.println("No");    
    } main {
        Program obj = new Program();
        Scanner in = new Scanner(System.in);
        int N = Integer.parseInt(in.nextLine());
        ArrayList<String> S = new ArrayList<String>();
        for(int i=0;i<N;i++) S.add(in.nextLine());
        boolean flag = true;
        for(int i = 0;i<S.size()-1;i++){
            if (S.get(i).charAt( S.get(i).length()-1 ) != S.get(i+1).charAt(0) ){
                flag = false; break;
            }
        }
        //System.out.println(new HashSet<String>(S).size());
        if (flag==true && new HashSet<String>(S).size()==N) System.out.println("Yes");
        else System.out.println("No");    
    } Program obj = new Program(); obj new Program() Scanner in = new Scanner(System.in); in new Scanner(System.in) int N = Integer.parseInt(in.nextLine()); N Integer.parseInt(in.nextLine()) Integer.parseInt Integer in.nextLine() in.nextLine in ArrayList<String> S = new ArrayList<String>(); S new ArrayList<String>() for(int i=0;i<N;i++) S.add(in.nextLine()); int i=0; int i=0; i 0 i<N i N i++ i++ i S.add(in.nextLine()); S.add(in.nextLine()) S.add S in.nextLine() in.nextLine in boolean flag = true; flag true for(int i = 0;i<S.size()-1;i++){
            if (S.get(i).charAt( S.get(i).length()-1 ) != S.get(i+1).charAt(0) ){
                flag = false; break;
            }
        } int i = 0; int i = 0; i 0 i<S.size()-1 i S.size()-1 S.size() S.size S 1 i++ i++ i {
            if (S.get(i).charAt( S.get(i).length()-1 ) != S.get(i+1).charAt(0) ){
                flag = false; break;
            }
        } {
            if (S.get(i).charAt( S.get(i).length()-1 ) != S.get(i+1).charAt(0) ){
                flag = false; break;
            }
        } if (S.get(i).charAt( S.get(i).length()-1 ) != S.get(i+1).charAt(0) ){
                flag = false; break;
            } S.get(i).charAt( S.get(i).length()-1 ) != S.get(i+1).charAt(0) S.get(i).charAt( S.get(i).length()-1 ) S.get(i).charAt S.get(i) S.get S i S.get(i).length()-1 S.get(i).length() S.get(i).length S.get(i) S.get S i 1 S.get(i+1).charAt(0) S.get(i+1).charAt S.get(i+1) S.get S i+1 i 1 0 {
                flag = false; break;
            } flag = false flag false break; if (flag==true && new HashSet<String>(S).size()==N) System.out.println("Yes");
        else System.out.println("No"); flag==true && new HashSet<String>(S).size()==N flag==true flag true new HashSet<String>(S).size()==N new HashSet<String>(S).size() new HashSet<String>(S).size new HashSet<String>(S) N 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
import java.io.*;
import java.util.*;
class Program{
    
}
class Main{
    public static void main(String[] args) {
        Program obj = new Program();
        Scanner in = new Scanner(System.in);
        int N = Integer.parseInt(in.nextLine());
        ArrayList<String> S = new ArrayList<String>();
        for(int i=0;i<N;i++) S.add(in.nextLine());
        boolean flag = true;
        for(int i = 0;i<S.size()-1;i++){
            if (S.get(i).charAt( S.get(i).length()-1 ) != S.get(i+1).charAt(0) ){
                flag = false; break;
            }
        }
        //System.out.println(new HashSet<String>(S).size());
        if (flag==true && new HashSet<String>(S).size()==N) System.out.println("Yes");
        else System.out.println("No");    
    }
}