import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner scan = new Scanner(System.in);
        
        // 標準入力の取得
        int N = Integer.parseInt(scan.next());

        String[] W = new String[N];
        for (int i = 0; i < N; i++) {
            W[i] = scan.next();
        }
        scan.close();

        // 重複チェック
        Set<String> Wst = new HashSet<String>(Arrays.asList(W));
        if(!(Wst.size() == N)){
            System.out.println("No");
            return ;
        }
        
        // しりとりできてるかチェック
        for (int i = 0; i < N-1; i++) {
            if(W[i].charAt(W[i].length() - 1) != W[i+1].charAt(0)){
                System.out.println("No");
                return ; 
            }
        }
        System.out.println("Yes");
        return ; 
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner scan = new Scanner(System.in);
        
        // 標準入力の取得
        int N = Integer.parseInt(scan.next());

        String[] W = new String[N];
        for (int i = 0; i < N; i++) {
            W[i] = scan.next();
        }
        scan.close();

        // 重複チェック
        Set<String> Wst = new HashSet<String>(Arrays.asList(W));
        if(!(Wst.size() == N)){
            System.out.println("No");
            return ;
        }
        
        // しりとりできてるかチェック
        for (int i = 0; i < N-1; i++) {
            if(W[i].charAt(W[i].length() - 1) != W[i+1].charAt(0)){
                System.out.println("No");
                return ; 
            }
        }
        System.out.println("Yes");
        return ; 
    }
} Main public static void main(String[] args) throws Exception {
        Scanner scan = new Scanner(System.in);
        
        // 標準入力の取得
        int N = Integer.parseInt(scan.next());

        String[] W = new String[N];
        for (int i = 0; i < N; i++) {
            W[i] = scan.next();
        }
        scan.close();

        // 重複チェック
        Set<String> Wst = new HashSet<String>(Arrays.asList(W));
        if(!(Wst.size() == N)){
            System.out.println("No");
            return ;
        }
        
        // しりとりできてるかチェック
        for (int i = 0; i < N-1; i++) {
            if(W[i].charAt(W[i].length() - 1) != W[i+1].charAt(0)){
                System.out.println("No");
                return ; 
            }
        }
        System.out.println("Yes");
        return ; 
    } main {
        Scanner scan = new Scanner(System.in);
        
        // 標準入力の取得
        int N = Integer.parseInt(scan.next());

        String[] W = new String[N];
        for (int i = 0; i < N; i++) {
            W[i] = scan.next();
        }
        scan.close();

        // 重複チェック
        Set<String> Wst = new HashSet<String>(Arrays.asList(W));
        if(!(Wst.size() == N)){
            System.out.println("No");
            return ;
        }
        
        // しりとりできてるかチェック
        for (int i = 0; i < N-1; i++) {
            if(W[i].charAt(W[i].length() - 1) != W[i+1].charAt(0)){
                System.out.println("No");
                return ; 
            }
        }
        System.out.println("Yes");
        return ; 
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = Integer.parseInt(scan.next()); N Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan String[] W = new String[N]; W new String[N] N for (int i = 0; i < N; i++) {
            W[i] = scan.next();
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            W[i] = scan.next();
        } {
            W[i] = scan.next();
        } W[i] = scan.next() W[i] W i scan.next() scan.next scan scan.close() scan.close scan Set<String> Wst = new HashSet<String>(Arrays.asList(W)); Wst new HashSet<String>(Arrays.asList(W)) if(!(Wst.size() == N)){
            System.out.println("No");
            return ;
        } !(Wst.size() == N) (Wst.size() == N) Wst.size() Wst.size Wst N {
            System.out.println("No");
            return ;
        } System.out.println("No") System.out.println System.out System System.out "No" return ; for (int i = 0; i < N-1; i++) {
            if(W[i].charAt(W[i].length() - 1) != W[i+1].charAt(0)){
                System.out.println("No");
                return ; 
            }
        } int i = 0; int i = 0; i 0 i < N-1 i N-1 N 1 i++ i++ i {
            if(W[i].charAt(W[i].length() - 1) != W[i+1].charAt(0)){
                System.out.println("No");
                return ; 
            }
        } {
            if(W[i].charAt(W[i].length() - 1) != W[i+1].charAt(0)){
                System.out.println("No");
                return ; 
            }
        } if(W[i].charAt(W[i].length() - 1) != W[i+1].charAt(0)){
                System.out.println("No");
                return ; 
            } W[i].charAt(W[i].length() - 1) != W[i+1].charAt(0) W[i].charAt(W[i].length() - 1) W[i].charAt W[i] W i W[i].length() - 1 W[i].length() W[i].length W[i] W i 1 W[i+1].charAt(0) W[i+1].charAt W[i+1] W i+1 i 1 0 {
                System.out.println("No");
                return ; 
            } System.out.println("No") System.out.println System.out System System.out "No" return ; System.out.println("Yes") System.out.println System.out System System.out "Yes" return ; String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner scan = new Scanner(System.in);
        
        // 標準入力の取得
        int N = Integer.parseInt(scan.next());

        String[] W = new String[N];
        for (int i = 0; i < N; i++) {
            W[i] = scan.next();
        }
        scan.close();

        // 重複チェック
        Set<String> Wst = new HashSet<String>(Arrays.asList(W));
        if(!(Wst.size() == N)){
            System.out.println("No");
            return ;
        }
        
        // しりとりできてるかチェック
        for (int i = 0; i < N-1; i++) {
            if(W[i].charAt(W[i].length() - 1) != W[i+1].charAt(0)){
                System.out.println("No");
                return ; 
            }
        }
        System.out.println("Yes");
        return ; 
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner scan = new Scanner(System.in);
        
        // 標準入力の取得
        int N = Integer.parseInt(scan.next());

        String[] W = new String[N];
        for (int i = 0; i < N; i++) {
            W[i] = scan.next();
        }
        scan.close();

        // 重複チェック
        Set<String> Wst = new HashSet<String>(Arrays.asList(W));
        if(!(Wst.size() == N)){
            System.out.println("No");
            return ;
        }
        
        // しりとりできてるかチェック
        for (int i = 0; i < N-1; i++) {
            if(W[i].charAt(W[i].length() - 1) != W[i+1].charAt(0)){
                System.out.println("No");
                return ; 
            }
        }
        System.out.println("Yes");
        return ; 
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner scan = new Scanner(System.in);
        
        // 標準入力の取得
        int N = Integer.parseInt(scan.next());

        String[] W = new String[N];
        for (int i = 0; i < N; i++) {
            W[i] = scan.next();
        }
        scan.close();

        // 重複チェック
        Set<String> Wst = new HashSet<String>(Arrays.asList(W));
        if(!(Wst.size() == N)){
            System.out.println("No");
            return ;
        }
        
        // しりとりできてるかチェック
        for (int i = 0; i < N-1; i++) {
            if(W[i].charAt(W[i].length() - 1) != W[i+1].charAt(0)){
                System.out.println("No");
                return ; 
            }
        }
        System.out.println("Yes");
        return ; 
    }
}
