import java.util.*;

public class Main{
    public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int N = sc.nextInt();
	Set<String> sss = new HashSet<String>();
	String f = sc.next();
	sss.add(f);
	String s = null;
	boolean isOk = true;
	
	for(int i=0;i<N-1;i++){
	    s=sc.next();
	    sss.add(s);
	    if(f.charAt(f.length()-1) != s.charAt(0)){
		isOk = false;
		break;
	    }
	    f = s;
	}
	if(isOk==true && sss.size()==N) System.out.print("Yes");
	else System.out.print("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();
	Set<String> sss = new HashSet<String>();
	String f = sc.next();
	sss.add(f);
	String s = null;
	boolean isOk = true;
	
	for(int i=0;i<N-1;i++){
	    s=sc.next();
	    sss.add(s);
	    if(f.charAt(f.length()-1) != s.charAt(0)){
		isOk = false;
		break;
	    }
	    f = s;
	}
	if(isOk==true && sss.size()==N) System.out.print("Yes");
	else System.out.print("No");
    }
} Main public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int N = sc.nextInt();
	Set<String> sss = new HashSet<String>();
	String f = sc.next();
	sss.add(f);
	String s = null;
	boolean isOk = true;
	
	for(int i=0;i<N-1;i++){
	    s=sc.next();
	    sss.add(s);
	    if(f.charAt(f.length()-1) != s.charAt(0)){
		isOk = false;
		break;
	    }
	    f = s;
	}
	if(isOk==true && sss.size()==N) System.out.print("Yes");
	else System.out.print("No");
    } main {
	Scanner sc = new Scanner(System.in);
	int N = sc.nextInt();
	Set<String> sss = new HashSet<String>();
	String f = sc.next();
	sss.add(f);
	String s = null;
	boolean isOk = true;
	
	for(int i=0;i<N-1;i++){
	    s=sc.next();
	    sss.add(s);
	    if(f.charAt(f.length()-1) != s.charAt(0)){
		isOk = false;
		break;
	    }
	    f = s;
	}
	if(isOk==true && sss.size()==N) System.out.print("Yes");
	else System.out.print("No");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc Set<String> sss = new HashSet<String>(); sss new HashSet<String>() String f = sc.next(); f sc.next() sc.next sc sss.add(f) sss.add sss f String s = null; s null boolean isOk = true; isOk true for(int i=0;i<N-1;i++){
	    s=sc.next();
	    sss.add(s);
	    if(f.charAt(f.length()-1) != s.charAt(0)){
		isOk = false;
		break;
	    }
	    f = s;
	} int i=0; int i=0; i 0 i<N-1 i N-1 N 1 i++ i++ i {
	    s=sc.next();
	    sss.add(s);
	    if(f.charAt(f.length()-1) != s.charAt(0)){
		isOk = false;
		break;
	    }
	    f = s;
	} {
	    s=sc.next();
	    sss.add(s);
	    if(f.charAt(f.length()-1) != s.charAt(0)){
		isOk = false;
		break;
	    }
	    f = s;
	} s=sc.next() s sc.next() sc.next sc sss.add(s) sss.add sss s if(f.charAt(f.length()-1) != s.charAt(0)){
		isOk = false;
		break;
	    } f.charAt(f.length()-1) != s.charAt(0) f.charAt(f.length()-1) f.charAt f f.length()-1 f.length() f.length f 1 s.charAt(0) s.charAt s 0 {
		isOk = false;
		break;
	    } isOk = false isOk false break; f = s f s if(isOk==true && sss.size()==N) System.out.print("Yes");
	else System.out.print("No"); isOk==true && sss.size()==N isOk==true isOk true sss.size()==N sss.size() sss.size sss N System.out.print("Yes") System.out.print System.out System System.out "Yes" System.out.print("No") System.out.print 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();
	Set<String> sss = new HashSet<String>();
	String f = sc.next();
	sss.add(f);
	String s = null;
	boolean isOk = true;
	
	for(int i=0;i<N-1;i++){
	    s=sc.next();
	    sss.add(s);
	    if(f.charAt(f.length()-1) != s.charAt(0)){
		isOk = false;
		break;
	    }
	    f = s;
	}
	if(isOk==true && sss.size()==N) System.out.print("Yes");
	else System.out.print("No");
    }
} public class Main{
    public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int N = sc.nextInt();
	Set<String> sss = new HashSet<String>();
	String f = sc.next();
	sss.add(f);
	String s = null;
	boolean isOk = true;
	
	for(int i=0;i<N-1;i++){
	    s=sc.next();
	    sss.add(s);
	    if(f.charAt(f.length()-1) != s.charAt(0)){
		isOk = false;
		break;
	    }
	    f = s;
	}
	if(isOk==true && sss.size()==N) System.out.print("Yes");
	else System.out.print("No");
    }
} Main
import java.util.*;

public class Main{
    public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int N = sc.nextInt();
	Set<String> sss = new HashSet<String>();
	String f = sc.next();
	sss.add(f);
	String s = null;
	boolean isOk = true;
	
	for(int i=0;i<N-1;i++){
	    s=sc.next();
	    sss.add(s);
	    if(f.charAt(f.length()-1) != s.charAt(0)){
		isOk = false;
		break;
	    }
	    f = s;
	}
	if(isOk==true && sss.size()==N) System.out.print("Yes");
	else System.out.print("No");
    }
}
