import java.util.Scanner;

public class Main{
    public static void main(String[] args){
	Scanner scan = new Scanner(System.in);

	int n = scan.nextInt();
	String[] w = new String[n];
	w[0] = scan.next();
	int flag = 1;
	for(int i = 1; i < n; i++){
	    w[i] = scan.next();
	    if(w[i].charAt(0) !=
	       w[i-1].charAt(w[i-1].length()-1)){
		flag = -1;
	    }
	}

	if(flag == 1){
	    for(int i = 0; i < n; i++){
		for(int j = i-1; j >= 0; j--){
		    if(w[i].equals(w[j])){
			flag = -1;
		    }
		}
	    }
	}

	if(flag == 1){
	    System.out.println("Yes");
	}else{
	    System.out.println("No");
	}
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args){
	Scanner scan = new Scanner(System.in);

	int n = scan.nextInt();
	String[] w = new String[n];
	w[0] = scan.next();
	int flag = 1;
	for(int i = 1; i < n; i++){
	    w[i] = scan.next();
	    if(w[i].charAt(0) !=
	       w[i-1].charAt(w[i-1].length()-1)){
		flag = -1;
	    }
	}

	if(flag == 1){
	    for(int i = 0; i < n; i++){
		for(int j = i-1; j >= 0; j--){
		    if(w[i].equals(w[j])){
			flag = -1;
		    }
		}
	    }
	}

	if(flag == 1){
	    System.out.println("Yes");
	}else{
	    System.out.println("No");
	}
    }
} Main public static void main(String[] args){
	Scanner scan = new Scanner(System.in);

	int n = scan.nextInt();
	String[] w = new String[n];
	w[0] = scan.next();
	int flag = 1;
	for(int i = 1; i < n; i++){
	    w[i] = scan.next();
	    if(w[i].charAt(0) !=
	       w[i-1].charAt(w[i-1].length()-1)){
		flag = -1;
	    }
	}

	if(flag == 1){
	    for(int i = 0; i < n; i++){
		for(int j = i-1; j >= 0; j--){
		    if(w[i].equals(w[j])){
			flag = -1;
		    }
		}
	    }
	}

	if(flag == 1){
	    System.out.println("Yes");
	}else{
	    System.out.println("No");
	}
    } main {
	Scanner scan = new Scanner(System.in);

	int n = scan.nextInt();
	String[] w = new String[n];
	w[0] = scan.next();
	int flag = 1;
	for(int i = 1; i < n; i++){
	    w[i] = scan.next();
	    if(w[i].charAt(0) !=
	       w[i-1].charAt(w[i-1].length()-1)){
		flag = -1;
	    }
	}

	if(flag == 1){
	    for(int i = 0; i < n; i++){
		for(int j = i-1; j >= 0; j--){
		    if(w[i].equals(w[j])){
			flag = -1;
		    }
		}
	    }
	}

	if(flag == 1){
	    System.out.println("Yes");
	}else{
	    System.out.println("No");
	}
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan String[] w = new String[n]; w new String[n] n w[0] = scan.next() w[0] w 0 scan.next() scan.next scan int flag = 1; flag 1 for(int i = 1; i < n; i++){
	    w[i] = scan.next();
	    if(w[i].charAt(0) !=
	       w[i-1].charAt(w[i-1].length()-1)){
		flag = -1;
	    }
	} int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
	    w[i] = scan.next();
	    if(w[i].charAt(0) !=
	       w[i-1].charAt(w[i-1].length()-1)){
		flag = -1;
	    }
	} {
	    w[i] = scan.next();
	    if(w[i].charAt(0) !=
	       w[i-1].charAt(w[i-1].length()-1)){
		flag = -1;
	    }
	} w[i] = scan.next() w[i] w i scan.next() scan.next scan if(w[i].charAt(0) !=
	       w[i-1].charAt(w[i-1].length()-1)){
		flag = -1;
	    } w[i].charAt(0) !=
	       w[i-1].charAt(w[i-1].length()-1) w[i].charAt(0) w[i].charAt w[i] w i 0 w[i-1].charAt(w[i-1].length()-1) w[i-1].charAt w[i-1] w i-1 i 1 w[i-1].length()-1 w[i-1].length() w[i-1].length w[i-1] w i-1 i 1 1 {
		flag = -1;
	    } flag = -1 flag -1 1 if(flag == 1){
	    for(int i = 0; i < n; i++){
		for(int j = i-1; j >= 0; j--){
		    if(w[i].equals(w[j])){
			flag = -1;
		    }
		}
	    }
	} flag == 1 flag 1 {
	    for(int i = 0; i < n; i++){
		for(int j = i-1; j >= 0; j--){
		    if(w[i].equals(w[j])){
			flag = -1;
		    }
		}
	    }
	} for(int i = 0; i < n; i++){
		for(int j = i-1; j >= 0; j--){
		    if(w[i].equals(w[j])){
			flag = -1;
		    }
		}
	    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
		for(int j = i-1; j >= 0; j--){
		    if(w[i].equals(w[j])){
			flag = -1;
		    }
		}
	    } {
		for(int j = i-1; j >= 0; j--){
		    if(w[i].equals(w[j])){
			flag = -1;
		    }
		}
	    } for(int j = i-1; j >= 0; j--){
		    if(w[i].equals(w[j])){
			flag = -1;
		    }
		} int j = i-1; int j = i-1; j i-1 i 1 j >= 0 j 0 j-- j-- j {
		    if(w[i].equals(w[j])){
			flag = -1;
		    }
		} {
		    if(w[i].equals(w[j])){
			flag = -1;
		    }
		} if(w[i].equals(w[j])){
			flag = -1;
		    } w[i].equals(w[j]) w[i].equals w[i] w i w[j] w j {
			flag = -1;
		    } flag = -1 flag -1 1 if(flag == 1){
	    System.out.println("Yes");
	}else{
	    System.out.println("No");
	} flag == 1 flag 1 {
	    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 scan = new Scanner(System.in);

	int n = scan.nextInt();
	String[] w = new String[n];
	w[0] = scan.next();
	int flag = 1;
	for(int i = 1; i < n; i++){
	    w[i] = scan.next();
	    if(w[i].charAt(0) !=
	       w[i-1].charAt(w[i-1].length()-1)){
		flag = -1;
	    }
	}

	if(flag == 1){
	    for(int i = 0; i < n; i++){
		for(int j = i-1; j >= 0; j--){
		    if(w[i].equals(w[j])){
			flag = -1;
		    }
		}
	    }
	}

	if(flag == 1){
	    System.out.println("Yes");
	}else{
	    System.out.println("No");
	}
    }
} public class Main{
    public static void main(String[] args){
	Scanner scan = new Scanner(System.in);

	int n = scan.nextInt();
	String[] w = new String[n];
	w[0] = scan.next();
	int flag = 1;
	for(int i = 1; i < n; i++){
	    w[i] = scan.next();
	    if(w[i].charAt(0) !=
	       w[i-1].charAt(w[i-1].length()-1)){
		flag = -1;
	    }
	}

	if(flag == 1){
	    for(int i = 0; i < n; i++){
		for(int j = i-1; j >= 0; j--){
		    if(w[i].equals(w[j])){
			flag = -1;
		    }
		}
	    }
	}

	if(flag == 1){
	    System.out.println("Yes");
	}else{
	    System.out.println("No");
	}
    }
} Main
import java.util.Scanner;

public class Main{
    public static void main(String[] args){
	Scanner scan = new Scanner(System.in);

	int n = scan.nextInt();
	String[] w = new String[n];
	w[0] = scan.next();
	int flag = 1;
	for(int i = 1; i < n; i++){
	    w[i] = scan.next();
	    if(w[i].charAt(0) !=
	       w[i-1].charAt(w[i-1].length()-1)){
		flag = -1;
	    }
	}

	if(flag == 1){
	    for(int i = 0; i < n; i++){
		for(int j = i-1; j >= 0; j--){
		    if(w[i].equals(w[j])){
			flag = -1;
		    }
		}
	    }
	}

	if(flag == 1){
	    System.out.println("Yes");
	}else{
	    System.out.println("No");
	}
    }
}
