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());

        List<String> W = new ArrayList<String>(N);
        for (int i = 0; i < N; i++) {
            W.add(scan.next());
        }

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

        List<String> W = new ArrayList<String>(N);
        for (int i = 0; i < N; i++) {
            W.add(scan.next());
        }

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

        List<String> W = new ArrayList<String>(N);
        for (int i = 0; i < N; i++) {
            W.add(scan.next());
        }

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

        List<String> W = new ArrayList<String>(N);
        for (int i = 0; i < N; i++) {
            W.add(scan.next());
        }

        // 重複チェック
        Set<String> Wst = new HashSet<String>(W);
        if(!(Wst.size() == W.size())){
            System.out.println("No");
            return ;
        }
        
        // しりとりできてるかチェック
        for (int i = 0; i < N-1; i++) {
            if(W.get(i).charAt(W.get(i).length() - 1) != W.get(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 List<String> W = new ArrayList<String>(N); W new ArrayList<String>(N) for (int i = 0; i < N; i++) {
            W.add(scan.next());
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            W.add(scan.next());
        } {
            W.add(scan.next());
        } W.add(scan.next()) W.add W scan.next() scan.next scan Set<String> Wst = new HashSet<String>(W); Wst new HashSet<String>(W) if(!(Wst.size() == W.size())){
            System.out.println("No");
            return ;
        } !(Wst.size() == W.size()) (Wst.size() == W.size()) Wst.size() Wst.size Wst W.size() W.size W {
            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.get(i).charAt(W.get(i).length() - 1) != W.get(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.get(i).charAt(W.get(i).length() - 1) != W.get(i+1).charAt(0)){
                System.out.println("No");
                return ; 
            }
        } {
            if(W.get(i).charAt(W.get(i).length() - 1) != W.get(i+1).charAt(0)){
                System.out.println("No");
                return ; 
            }
        } if(W.get(i).charAt(W.get(i).length() - 1) != W.get(i+1).charAt(0)){
                System.out.println("No");
                return ; 
            } W.get(i).charAt(W.get(i).length() - 1) != W.get(i+1).charAt(0) W.get(i).charAt(W.get(i).length() - 1) W.get(i).charAt W.get(i) W.get W i W.get(i).length() - 1 W.get(i).length() W.get(i).length W.get(i) W.get W i 1 W.get(i+1).charAt(0) W.get(i+1).charAt W.get(i+1) W.get 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());

        List<String> W = new ArrayList<String>(N);
        for (int i = 0; i < N; i++) {
            W.add(scan.next());
        }

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

        List<String> W = new ArrayList<String>(N);
        for (int i = 0; i < N; i++) {
            W.add(scan.next());
        }

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

        List<String> W = new ArrayList<String>(N);
        for (int i = 0; i < N; i++) {
            W.add(scan.next());
        }

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