//ｺｯwwｺｯwwｺｹｯwwwｺｯwwｺｹｯwwwｺｹｯｺｯwwwｺｯwwｺｯwwｺｹｯwwwｺｯwwｺｹｯwwwｺｹｯｺｯwwwｺｹｰｰｰｰｯ!!!wwwwwｺｯwwｺｯwwｺｹｯwwwｺｯwwｺｹｯwwwｺｹｯｺｯwwwｺｯwwｺｯwwｺｹｯwwwｺｯwwwｺｹｯwwwｺｹｯｺｯwwwｺｹｰｰｰｰｯ!!!wwwwwｺｹｯｺｯｯｺｰｰｰｰ!!!!!!wwwwwwwwwww
import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] s = new String[n];
        for(int i = 0 ; i < n ; i++){
            s[i] = sc.next();
        }
        sc.close();
        boolean ebishu = true;
        for(int i = 1 ; i < n && ebishu ; i++){
            if(s[i - 1].charAt(s[i - 1].length() - 1) != s[i].charAt(0)) ebishu = false;
        }
        Arrays.sort(s);
        for(int i = 1 ; i < n && ebishu ; i++){
            if(s[i - 1].equals(s[i])) ebishu = false;
        }
        if(ebishu){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
} 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[] s = new String[n];
        for(int i = 0 ; i < n ; i++){
            s[i] = sc.next();
        }
        sc.close();
        boolean ebishu = true;
        for(int i = 1 ; i < n && ebishu ; i++){
            if(s[i - 1].charAt(s[i - 1].length() - 1) != s[i].charAt(0)) ebishu = false;
        }
        Arrays.sort(s);
        for(int i = 1 ; i < n && ebishu ; i++){
            if(s[i - 1].equals(s[i])) ebishu = false;
        }
        if(ebishu){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] s = new String[n];
        for(int i = 0 ; i < n ; i++){
            s[i] = sc.next();
        }
        sc.close();
        boolean ebishu = true;
        for(int i = 1 ; i < n && ebishu ; i++){
            if(s[i - 1].charAt(s[i - 1].length() - 1) != s[i].charAt(0)) ebishu = false;
        }
        Arrays.sort(s);
        for(int i = 1 ; i < n && ebishu ; i++){
            if(s[i - 1].equals(s[i])) ebishu = false;
        }
        if(ebishu){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] s = new String[n];
        for(int i = 0 ; i < n ; i++){
            s[i] = sc.next();
        }
        sc.close();
        boolean ebishu = true;
        for(int i = 1 ; i < n && ebishu ; i++){
            if(s[i - 1].charAt(s[i - 1].length() - 1) != s[i].charAt(0)) ebishu = false;
        }
        Arrays.sort(s);
        for(int i = 1 ; i < n && ebishu ; i++){
            if(s[i - 1].equals(s[i])) ebishu = false;
        }
        if(ebishu){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc String[] s = new String[n]; s new String[n] n for(int i = 0 ; i < n ; i++){
            s[i] = sc.next();
        } int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i {
            s[i] = sc.next();
        } {
            s[i] = sc.next();
        } s[i] = sc.next() s[i] s i sc.next() sc.next sc sc.close() sc.close sc boolean ebishu = true; ebishu true for(int i = 1 ; i < n && ebishu ; i++){
            if(s[i - 1].charAt(s[i - 1].length() - 1) != s[i].charAt(0)) ebishu = false;
        } int i = 1 ; int i = 1 ; i 1 i < n && ebishu i < n i n ebishu i++ i++ i {
            if(s[i - 1].charAt(s[i - 1].length() - 1) != s[i].charAt(0)) ebishu = false;
        } {
            if(s[i - 1].charAt(s[i - 1].length() - 1) != s[i].charAt(0)) ebishu = false;
        } if(s[i - 1].charAt(s[i - 1].length() - 1) != s[i].charAt(0)) ebishu = false; s[i - 1].charAt(s[i - 1].length() - 1) != s[i].charAt(0) s[i - 1].charAt(s[i - 1].length() - 1) s[i - 1].charAt s[i - 1] s i - 1 i 1 s[i - 1].length() - 1 s[i - 1].length() s[i - 1].length s[i - 1] s i - 1 i 1 1 s[i].charAt(0) s[i].charAt s[i] s i 0 ebishu = false ebishu false Arrays.sort(s) Arrays.sort Arrays s for(int i = 1 ; i < n && ebishu ; i++){
            if(s[i - 1].equals(s[i])) ebishu = false;
        } int i = 1 ; int i = 1 ; i 1 i < n && ebishu i < n i n ebishu i++ i++ i {
            if(s[i - 1].equals(s[i])) ebishu = false;
        } {
            if(s[i - 1].equals(s[i])) ebishu = false;
        } if(s[i - 1].equals(s[i])) ebishu = false; s[i - 1].equals(s[i]) s[i - 1].equals s[i - 1] s i - 1 i 1 s[i] s i ebishu = false ebishu false if(ebishu){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        } ebishu {
            System.out.println("Yes");
        } System.out.println("Yes") System.out.println System.out System System.out "Yes" {
            System.out.println("No");
        } System.out.println("No") System.out.println System.out System System.out "No" String[] args args public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] s = new String[n];
        for(int i = 0 ; i < n ; i++){
            s[i] = sc.next();
        }
        sc.close();
        boolean ebishu = true;
        for(int i = 1 ; i < n && ebishu ; i++){
            if(s[i - 1].charAt(s[i - 1].length() - 1) != s[i].charAt(0)) ebishu = false;
        }
        Arrays.sort(s);
        for(int i = 1 ; i < n && ebishu ; i++){
            if(s[i - 1].equals(s[i])) ebishu = false;
        }
        if(ebishu){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] s = new String[n];
        for(int i = 0 ; i < n ; i++){
            s[i] = sc.next();
        }
        sc.close();
        boolean ebishu = true;
        for(int i = 1 ; i < n && ebishu ; i++){
            if(s[i - 1].charAt(s[i - 1].length() - 1) != s[i].charAt(0)) ebishu = false;
        }
        Arrays.sort(s);
        for(int i = 1 ; i < n && ebishu ; i++){
            if(s[i - 1].equals(s[i])) ebishu = false;
        }
        if(ebishu){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
} Main
//ｺｯwwｺｯwwｺｹｯwwwｺｯwwｺｹｯwwwｺｹｯｺｯwwwｺｯwwｺｯwwｺｹｯwwwｺｯwwｺｹｯwwwｺｹｯｺｯwwwｺｹｰｰｰｰｯ!!!wwwwwｺｯwwｺｯwwｺｹｯwwwｺｯwwｺｹｯwwwｺｹｯｺｯwwwｺｯwwｺｯwwｺｹｯwwwｺｯwwwｺｹｯwwwｺｹｯｺｯwwwｺｹｰｰｰｰｯ!!!wwwwwｺｹｯｺｯｯｺｰｰｰｰ!!!!!!wwwwwwwwwww
import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] s = new String[n];
        for(int i = 0 ; i < n ; i++){
            s[i] = sc.next();
        }
        sc.close();
        boolean ebishu = true;
        for(int i = 1 ; i < n && ebishu ; i++){
            if(s[i - 1].charAt(s[i - 1].length() - 1) != s[i].charAt(0)) ebishu = false;
        }
        Arrays.sort(s);
        for(int i = 1 ; i < n && ebishu ; i++){
            if(s[i - 1].equals(s[i])) ebishu = false;
        }
        if(ebishu){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
}