import java.io.*;
import java.util.*;
 
public class Main {
    public static void main(String args[]) throws IOException {
        Scanner sc = new Scanner(System.in);
        Integer num = sc.nextInt();
        List<String> str= new ArrayList<>();
        str.add(sc.next());
        for (int index = 1; index < num; index ++) {
            String tmp = sc.next();
            if(str.contains(tmp) || !tmp.substring(0,1).equals(str.get(index-1).substring(str.get(index-1).length()-1))){
                 System.out.println("No");
                 System.exit(0);
            }
            str.add(tmp);
        }
        System.out.println("Yes");
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
    public static void main(String args[]) throws IOException {
        Scanner sc = new Scanner(System.in);
        Integer num = sc.nextInt();
        List<String> str= new ArrayList<>();
        str.add(sc.next());
        for (int index = 1; index < num; index ++) {
            String tmp = sc.next();
            if(str.contains(tmp) || !tmp.substring(0,1).equals(str.get(index-1).substring(str.get(index-1).length()-1))){
                 System.out.println("No");
                 System.exit(0);
            }
            str.add(tmp);
        }
        System.out.println("Yes");
    }
} Main public static void main(String args[]) throws IOException {
        Scanner sc = new Scanner(System.in);
        Integer num = sc.nextInt();
        List<String> str= new ArrayList<>();
        str.add(sc.next());
        for (int index = 1; index < num; index ++) {
            String tmp = sc.next();
            if(str.contains(tmp) || !tmp.substring(0,1).equals(str.get(index-1).substring(str.get(index-1).length()-1))){
                 System.out.println("No");
                 System.exit(0);
            }
            str.add(tmp);
        }
        System.out.println("Yes");
    } main {
        Scanner sc = new Scanner(System.in);
        Integer num = sc.nextInt();
        List<String> str= new ArrayList<>();
        str.add(sc.next());
        for (int index = 1; index < num; index ++) {
            String tmp = sc.next();
            if(str.contains(tmp) || !tmp.substring(0,1).equals(str.get(index-1).substring(str.get(index-1).length()-1))){
                 System.out.println("No");
                 System.exit(0);
            }
            str.add(tmp);
        }
        System.out.println("Yes");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) Integer num = sc.nextInt(); num sc.nextInt() sc.nextInt sc List<String> str= new ArrayList<>(); str new ArrayList<>() str.add(sc.next()) str.add str sc.next() sc.next sc for (int index = 1; index < num; index ++) {
            String tmp = sc.next();
            if(str.contains(tmp) || !tmp.substring(0,1).equals(str.get(index-1).substring(str.get(index-1).length()-1))){
                 System.out.println("No");
                 System.exit(0);
            }
            str.add(tmp);
        } int index = 1; int index = 1; index 1 index < num index num index ++ index ++ index {
            String tmp = sc.next();
            if(str.contains(tmp) || !tmp.substring(0,1).equals(str.get(index-1).substring(str.get(index-1).length()-1))){
                 System.out.println("No");
                 System.exit(0);
            }
            str.add(tmp);
        } {
            String tmp = sc.next();
            if(str.contains(tmp) || !tmp.substring(0,1).equals(str.get(index-1).substring(str.get(index-1).length()-1))){
                 System.out.println("No");
                 System.exit(0);
            }
            str.add(tmp);
        } String tmp = sc.next(); tmp sc.next() sc.next sc if(str.contains(tmp) || !tmp.substring(0,1).equals(str.get(index-1).substring(str.get(index-1).length()-1))){
                 System.out.println("No");
                 System.exit(0);
            } str.contains(tmp) || !tmp.substring(0,1).equals(str.get(index-1).substring(str.get(index-1).length()-1)) str.contains(tmp) str.contains str tmp !tmp.substring(0,1).equals(str.get(index-1).substring(str.get(index-1).length()-1)) tmp.substring(0,1).equals(str.get(index-1).substring(str.get(index-1).length()-1)) tmp.substring(0,1).equals tmp.substring(0,1) tmp.substring tmp 0 1 str.get(index-1).substring(str.get(index-1).length()-1) str.get(index-1).substring str.get(index-1) str.get str index-1 index 1 str.get(index-1).length()-1 str.get(index-1).length() str.get(index-1).length str.get(index-1) str.get str index-1 index 1 1 {
                 System.out.println("No");
                 System.exit(0);
            } System.out.println("No") System.out.println System.out System System.out "No" System.exit(0) System.exit System 0 str.add(tmp) str.add str tmp 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[]) throws IOException {
        Scanner sc = new Scanner(System.in);
        Integer num = sc.nextInt();
        List<String> str= new ArrayList<>();
        str.add(sc.next());
        for (int index = 1; index < num; index ++) {
            String tmp = sc.next();
            if(str.contains(tmp) || !tmp.substring(0,1).equals(str.get(index-1).substring(str.get(index-1).length()-1))){
                 System.out.println("No");
                 System.exit(0);
            }
            str.add(tmp);
        }
        System.out.println("Yes");
    }
} public class Main {
    public static void main(String args[]) throws IOException {
        Scanner sc = new Scanner(System.in);
        Integer num = sc.nextInt();
        List<String> str= new ArrayList<>();
        str.add(sc.next());
        for (int index = 1; index < num; index ++) {
            String tmp = sc.next();
            if(str.contains(tmp) || !tmp.substring(0,1).equals(str.get(index-1).substring(str.get(index-1).length()-1))){
                 System.out.println("No");
                 System.exit(0);
            }
            str.add(tmp);
        }
        System.out.println("Yes");
    }
} Main
import java.io.*;
import java.util.*;
 
public class Main {
    public static void main(String args[]) throws IOException {
        Scanner sc = new Scanner(System.in);
        Integer num = sc.nextInt();
        List<String> str= new ArrayList<>();
        str.add(sc.next());
        for (int index = 1; index < num; index ++) {
            String tmp = sc.next();
            if(str.contains(tmp) || !tmp.substring(0,1).equals(str.get(index-1).substring(str.get(index-1).length()-1))){
                 System.out.println("No");
                 System.exit(0);
            }
            str.add(tmp);
        }
        System.out.println("Yes");
    }
}