import java.util.*;

public class Main {
    public static void main(String[] main_1){
        Scanner scanner = new Scanner(System.in);
        int main_2 = scanner.nextInt();
        String[] main_3 = new String[main_2];
        for(int main_4 = 0;main_4 < main_2;main_4++){
            String main_5 = scanner.next();
            main_3[main_4] = main_5;
        }
        if(main_a(Arrays.asList(main_3))){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
    static boolean main_a(List<String> main_a_1){
        Set<String> main_a_2 = new HashSet<String>();
        for(String main_a_3 : main_a_1) {
            if(main_a_2.contains(main_a_3)) {
                return false;
            } else {
                main_a_2.add(main_a_3);
            }
        }
        for(int main_a_5 = 0;main_a_5 < main_a_1.size();main_a_5++){
            if(main_a_5 != 0){
                String main_a_6 = main_a_1.get(main_a_5 - 1);
                String main_a_7 = main_a_1.get(main_a_5);
                if(!main_a_6.substring(main_a_6.length() - 1).equalsIgnoreCase(main_a_7.substring(0, 1))){
                    return false;
                }
            }
        }
        return true;
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] main_1){
        Scanner scanner = new Scanner(System.in);
        int main_2 = scanner.nextInt();
        String[] main_3 = new String[main_2];
        for(int main_4 = 0;main_4 < main_2;main_4++){
            String main_5 = scanner.next();
            main_3[main_4] = main_5;
        }
        if(main_a(Arrays.asList(main_3))){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
    static boolean main_a(List<String> main_a_1){
        Set<String> main_a_2 = new HashSet<String>();
        for(String main_a_3 : main_a_1) {
            if(main_a_2.contains(main_a_3)) {
                return false;
            } else {
                main_a_2.add(main_a_3);
            }
        }
        for(int main_a_5 = 0;main_a_5 < main_a_1.size();main_a_5++){
            if(main_a_5 != 0){
                String main_a_6 = main_a_1.get(main_a_5 - 1);
                String main_a_7 = main_a_1.get(main_a_5);
                if(!main_a_6.substring(main_a_6.length() - 1).equalsIgnoreCase(main_a_7.substring(0, 1))){
                    return false;
                }
            }
        }
        return true;
    }
} Main public static void main(String[] main_1){
        Scanner scanner = new Scanner(System.in);
        int main_2 = scanner.nextInt();
        String[] main_3 = new String[main_2];
        for(int main_4 = 0;main_4 < main_2;main_4++){
            String main_5 = scanner.next();
            main_3[main_4] = main_5;
        }
        if(main_a(Arrays.asList(main_3))){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    } main {
        Scanner scanner = new Scanner(System.in);
        int main_2 = scanner.nextInt();
        String[] main_3 = new String[main_2];
        for(int main_4 = 0;main_4 < main_2;main_4++){
            String main_5 = scanner.next();
            main_3[main_4] = main_5;
        }
        if(main_a(Arrays.asList(main_3))){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int main_2 = scanner.nextInt(); main_2 scanner.nextInt() scanner.nextInt scanner String[] main_3 = new String[main_2]; main_3 new String[main_2] main_2 for(int main_4 = 0;main_4 < main_2;main_4++){
            String main_5 = scanner.next();
            main_3[main_4] = main_5;
        } int main_4 = 0; int main_4 = 0; main_4 0 main_4 < main_2 main_4 main_2 main_4++ main_4++ main_4 {
            String main_5 = scanner.next();
            main_3[main_4] = main_5;
        } {
            String main_5 = scanner.next();
            main_3[main_4] = main_5;
        } String main_5 = scanner.next(); main_5 scanner.next() scanner.next scanner main_3[main_4] = main_5 main_3[main_4] main_3 main_4 main_5 if(main_a(Arrays.asList(main_3))){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        } main_a(Arrays.asList(main_3)) main_a Arrays.asList(main_3) Arrays.asList Arrays main_3 {
            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[] main_1 main_1 static boolean main_a(List<String> main_a_1){
        Set<String> main_a_2 = new HashSet<String>();
        for(String main_a_3 : main_a_1) {
            if(main_a_2.contains(main_a_3)) {
                return false;
            } else {
                main_a_2.add(main_a_3);
            }
        }
        for(int main_a_5 = 0;main_a_5 < main_a_1.size();main_a_5++){
            if(main_a_5 != 0){
                String main_a_6 = main_a_1.get(main_a_5 - 1);
                String main_a_7 = main_a_1.get(main_a_5);
                if(!main_a_6.substring(main_a_6.length() - 1).equalsIgnoreCase(main_a_7.substring(0, 1))){
                    return false;
                }
            }
        }
        return true;
    } main_a {
        Set<String> main_a_2 = new HashSet<String>();
        for(String main_a_3 : main_a_1) {
            if(main_a_2.contains(main_a_3)) {
                return false;
            } else {
                main_a_2.add(main_a_3);
            }
        }
        for(int main_a_5 = 0;main_a_5 < main_a_1.size();main_a_5++){
            if(main_a_5 != 0){
                String main_a_6 = main_a_1.get(main_a_5 - 1);
                String main_a_7 = main_a_1.get(main_a_5);
                if(!main_a_6.substring(main_a_6.length() - 1).equalsIgnoreCase(main_a_7.substring(0, 1))){
                    return false;
                }
            }
        }
        return true;
    } Set<String> main_a_2 = new HashSet<String>(); main_a_2 new HashSet<String>() for(String main_a_3 : main_a_1) {
            if(main_a_2.contains(main_a_3)) {
                return false;
            } else {
                main_a_2.add(main_a_3);
            }
        } String main_a_3 main_a_1 {
            if(main_a_2.contains(main_a_3)) {
                return false;
            } else {
                main_a_2.add(main_a_3);
            }
        } {
            if(main_a_2.contains(main_a_3)) {
                return false;
            } else {
                main_a_2.add(main_a_3);
            }
        } if(main_a_2.contains(main_a_3)) {
                return false;
            } else {
                main_a_2.add(main_a_3);
            } main_a_2.contains(main_a_3) main_a_2.contains main_a_2 main_a_3 {
                return false;
            } return false; false {
                main_a_2.add(main_a_3);
            } main_a_2.add(main_a_3) main_a_2.add main_a_2 main_a_3 for(int main_a_5 = 0;main_a_5 < main_a_1.size();main_a_5++){
            if(main_a_5 != 0){
                String main_a_6 = main_a_1.get(main_a_5 - 1);
                String main_a_7 = main_a_1.get(main_a_5);
                if(!main_a_6.substring(main_a_6.length() - 1).equalsIgnoreCase(main_a_7.substring(0, 1))){
                    return false;
                }
            }
        } int main_a_5 = 0; int main_a_5 = 0; main_a_5 0 main_a_5 < main_a_1.size() main_a_5 main_a_1.size() main_a_1.size main_a_1 main_a_5++ main_a_5++ main_a_5 {
            if(main_a_5 != 0){
                String main_a_6 = main_a_1.get(main_a_5 - 1);
                String main_a_7 = main_a_1.get(main_a_5);
                if(!main_a_6.substring(main_a_6.length() - 1).equalsIgnoreCase(main_a_7.substring(0, 1))){
                    return false;
                }
            }
        } {
            if(main_a_5 != 0){
                String main_a_6 = main_a_1.get(main_a_5 - 1);
                String main_a_7 = main_a_1.get(main_a_5);
                if(!main_a_6.substring(main_a_6.length() - 1).equalsIgnoreCase(main_a_7.substring(0, 1))){
                    return false;
                }
            }
        } if(main_a_5 != 0){
                String main_a_6 = main_a_1.get(main_a_5 - 1);
                String main_a_7 = main_a_1.get(main_a_5);
                if(!main_a_6.substring(main_a_6.length() - 1).equalsIgnoreCase(main_a_7.substring(0, 1))){
                    return false;
                }
            } main_a_5 != 0 main_a_5 0 {
                String main_a_6 = main_a_1.get(main_a_5 - 1);
                String main_a_7 = main_a_1.get(main_a_5);
                if(!main_a_6.substring(main_a_6.length() - 1).equalsIgnoreCase(main_a_7.substring(0, 1))){
                    return false;
                }
            } String main_a_6 = main_a_1.get(main_a_5 - 1); main_a_6 main_a_1.get(main_a_5 - 1) main_a_1.get main_a_1 main_a_5 - 1 main_a_5 1 String main_a_7 = main_a_1.get(main_a_5); main_a_7 main_a_1.get(main_a_5) main_a_1.get main_a_1 main_a_5 if(!main_a_6.substring(main_a_6.length() - 1).equalsIgnoreCase(main_a_7.substring(0, 1))){
                    return false;
                } !main_a_6.substring(main_a_6.length() - 1).equalsIgnoreCase(main_a_7.substring(0, 1)) main_a_6.substring(main_a_6.length() - 1).equalsIgnoreCase(main_a_7.substring(0, 1)) main_a_6.substring(main_a_6.length() - 1).equalsIgnoreCase main_a_6.substring(main_a_6.length() - 1) main_a_6.substring main_a_6 main_a_6.length() - 1 main_a_6.length() main_a_6.length main_a_6 1 main_a_7.substring(0, 1) main_a_7.substring main_a_7 0 1 {
                    return false;
                } return false; false return true; true List<String> main_a_1 main_a_1 public class Main {
    public static void main(String[] main_1){
        Scanner scanner = new Scanner(System.in);
        int main_2 = scanner.nextInt();
        String[] main_3 = new String[main_2];
        for(int main_4 = 0;main_4 < main_2;main_4++){
            String main_5 = scanner.next();
            main_3[main_4] = main_5;
        }
        if(main_a(Arrays.asList(main_3))){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
    static boolean main_a(List<String> main_a_1){
        Set<String> main_a_2 = new HashSet<String>();
        for(String main_a_3 : main_a_1) {
            if(main_a_2.contains(main_a_3)) {
                return false;
            } else {
                main_a_2.add(main_a_3);
            }
        }
        for(int main_a_5 = 0;main_a_5 < main_a_1.size();main_a_5++){
            if(main_a_5 != 0){
                String main_a_6 = main_a_1.get(main_a_5 - 1);
                String main_a_7 = main_a_1.get(main_a_5);
                if(!main_a_6.substring(main_a_6.length() - 1).equalsIgnoreCase(main_a_7.substring(0, 1))){
                    return false;
                }
            }
        }
        return true;
    }
} public class Main {
    public static void main(String[] main_1){
        Scanner scanner = new Scanner(System.in);
        int main_2 = scanner.nextInt();
        String[] main_3 = new String[main_2];
        for(int main_4 = 0;main_4 < main_2;main_4++){
            String main_5 = scanner.next();
            main_3[main_4] = main_5;
        }
        if(main_a(Arrays.asList(main_3))){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
    static boolean main_a(List<String> main_a_1){
        Set<String> main_a_2 = new HashSet<String>();
        for(String main_a_3 : main_a_1) {
            if(main_a_2.contains(main_a_3)) {
                return false;
            } else {
                main_a_2.add(main_a_3);
            }
        }
        for(int main_a_5 = 0;main_a_5 < main_a_1.size();main_a_5++){
            if(main_a_5 != 0){
                String main_a_6 = main_a_1.get(main_a_5 - 1);
                String main_a_7 = main_a_1.get(main_a_5);
                if(!main_a_6.substring(main_a_6.length() - 1).equalsIgnoreCase(main_a_7.substring(0, 1))){
                    return false;
                }
            }
        }
        return true;
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] main_1){
        Scanner scanner = new Scanner(System.in);
        int main_2 = scanner.nextInt();
        String[] main_3 = new String[main_2];
        for(int main_4 = 0;main_4 < main_2;main_4++){
            String main_5 = scanner.next();
            main_3[main_4] = main_5;
        }
        if(main_a(Arrays.asList(main_3))){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
    static boolean main_a(List<String> main_a_1){
        Set<String> main_a_2 = new HashSet<String>();
        for(String main_a_3 : main_a_1) {
            if(main_a_2.contains(main_a_3)) {
                return false;
            } else {
                main_a_2.add(main_a_3);
            }
        }
        for(int main_a_5 = 0;main_a_5 < main_a_1.size();main_a_5++){
            if(main_a_5 != 0){
                String main_a_6 = main_a_1.get(main_a_5 - 1);
                String main_a_7 = main_a_1.get(main_a_5);
                if(!main_a_6.substring(main_a_6.length() - 1).equalsIgnoreCase(main_a_7.substring(0, 1))){
                    return false;
                }
            }
        }
        return true;
    }
}