import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;

public class Main{
	public static void main(String[] args){
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		try {
			ArrayList<String> list = new ArrayList<String>();
			int N =Integer.parseInt(br.readLine());
			String pre = br.readLine();
			list.add(pre);
			for(int i=1;i<N;i++){
				String post = br.readLine();
				if(list.contains(post)){
					System.out.println("No");
					return;
				}
				if(pre.charAt(pre.length()-1) != post.charAt(0)){
					System.out.println("No");
                                        return;
				}
				list.add(post);
				pre = post;
			}
			System.out.println("Yes");
		} catch (IOException e) {
			e.printStackTrace();
		}finally{
			try {
				br.close();
			} catch (IOException e) {
				// NOP
			}
		}
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util public class Main{
	public static void main(String[] args){
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		try {
			ArrayList<String> list = new ArrayList<String>();
			int N =Integer.parseInt(br.readLine());
			String pre = br.readLine();
			list.add(pre);
			for(int i=1;i<N;i++){
				String post = br.readLine();
				if(list.contains(post)){
					System.out.println("No");
					return;
				}
				if(pre.charAt(pre.length()-1) != post.charAt(0)){
					System.out.println("No");
                                        return;
				}
				list.add(post);
				pre = post;
			}
			System.out.println("Yes");
		} catch (IOException e) {
			e.printStackTrace();
		}finally{
			try {
				br.close();
			} catch (IOException e) {
				// NOP
			}
		}
	}

} Main public static void main(String[] args){
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		try {
			ArrayList<String> list = new ArrayList<String>();
			int N =Integer.parseInt(br.readLine());
			String pre = br.readLine();
			list.add(pre);
			for(int i=1;i<N;i++){
				String post = br.readLine();
				if(list.contains(post)){
					System.out.println("No");
					return;
				}
				if(pre.charAt(pre.length()-1) != post.charAt(0)){
					System.out.println("No");
                                        return;
				}
				list.add(post);
				pre = post;
			}
			System.out.println("Yes");
		} catch (IOException e) {
			e.printStackTrace();
		}finally{
			try {
				br.close();
			} catch (IOException e) {
				// NOP
			}
		}
	} main {
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		try {
			ArrayList<String> list = new ArrayList<String>();
			int N =Integer.parseInt(br.readLine());
			String pre = br.readLine();
			list.add(pre);
			for(int i=1;i<N;i++){
				String post = br.readLine();
				if(list.contains(post)){
					System.out.println("No");
					return;
				}
				if(pre.charAt(pre.length()-1) != post.charAt(0)){
					System.out.println("No");
                                        return;
				}
				list.add(post);
				pre = post;
			}
			System.out.println("Yes");
		} catch (IOException e) {
			e.printStackTrace();
		}finally{
			try {
				br.close();
			} catch (IOException e) {
				// NOP
			}
		}
	} InputStreamReader isr = new InputStreamReader(System.in); isr new InputStreamReader(System.in) BufferedReader br = new BufferedReader(isr); br new BufferedReader(isr) try {
			ArrayList<String> list = new ArrayList<String>();
			int N =Integer.parseInt(br.readLine());
			String pre = br.readLine();
			list.add(pre);
			for(int i=1;i<N;i++){
				String post = br.readLine();
				if(list.contains(post)){
					System.out.println("No");
					return;
				}
				if(pre.charAt(pre.length()-1) != post.charAt(0)){
					System.out.println("No");
                                        return;
				}
				list.add(post);
				pre = post;
			}
			System.out.println("Yes");
		} catch (IOException e) {
			e.printStackTrace();
		}finally{
			try {
				br.close();
			} catch (IOException e) {
				// NOP
			}
		} catch (IOException e) {
			e.printStackTrace();
		} IOException e {
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {
			try {
				br.close();
			} catch (IOException e) {
				// NOP
			}
		} try {
				br.close();
			} catch (IOException e) {
				// NOP
			} catch (IOException e) {
				// NOP
			} IOException e {
				// NOP
			} {
				br.close();
			} br.close() br.close br {
			ArrayList<String> list = new ArrayList<String>();
			int N =Integer.parseInt(br.readLine());
			String pre = br.readLine();
			list.add(pre);
			for(int i=1;i<N;i++){
				String post = br.readLine();
				if(list.contains(post)){
					System.out.println("No");
					return;
				}
				if(pre.charAt(pre.length()-1) != post.charAt(0)){
					System.out.println("No");
                                        return;
				}
				list.add(post);
				pre = post;
			}
			System.out.println("Yes");
		} ArrayList<String> list = new ArrayList<String>(); list new ArrayList<String>() int N =Integer.parseInt(br.readLine()); N Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br String pre = br.readLine(); pre br.readLine() br.readLine br list.add(pre) list.add list pre for(int i=1;i<N;i++){
				String post = br.readLine();
				if(list.contains(post)){
					System.out.println("No");
					return;
				}
				if(pre.charAt(pre.length()-1) != post.charAt(0)){
					System.out.println("No");
                                        return;
				}
				list.add(post);
				pre = post;
			} int i=1; int i=1; i 1 i<N i N i++ i++ i {
				String post = br.readLine();
				if(list.contains(post)){
					System.out.println("No");
					return;
				}
				if(pre.charAt(pre.length()-1) != post.charAt(0)){
					System.out.println("No");
                                        return;
				}
				list.add(post);
				pre = post;
			} {
				String post = br.readLine();
				if(list.contains(post)){
					System.out.println("No");
					return;
				}
				if(pre.charAt(pre.length()-1) != post.charAt(0)){
					System.out.println("No");
                                        return;
				}
				list.add(post);
				pre = post;
			} String post = br.readLine(); post br.readLine() br.readLine br if(list.contains(post)){
					System.out.println("No");
					return;
				} list.contains(post) list.contains list post {
					System.out.println("No");
					return;
				} System.out.println("No") System.out.println System.out System System.out "No" return; if(pre.charAt(pre.length()-1) != post.charAt(0)){
					System.out.println("No");
                                        return;
				} pre.charAt(pre.length()-1) != post.charAt(0) pre.charAt(pre.length()-1) pre.charAt pre pre.length()-1 pre.length() pre.length pre 1 post.charAt(0) post.charAt post 0 {
					System.out.println("No");
                                        return;
				} System.out.println("No") System.out.println System.out System System.out "No" return; list.add(post) list.add list post pre = post pre post System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args public class Main{
	public static void main(String[] args){
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		try {
			ArrayList<String> list = new ArrayList<String>();
			int N =Integer.parseInt(br.readLine());
			String pre = br.readLine();
			list.add(pre);
			for(int i=1;i<N;i++){
				String post = br.readLine();
				if(list.contains(post)){
					System.out.println("No");
					return;
				}
				if(pre.charAt(pre.length()-1) != post.charAt(0)){
					System.out.println("No");
                                        return;
				}
				list.add(post);
				pre = post;
			}
			System.out.println("Yes");
		} catch (IOException e) {
			e.printStackTrace();
		}finally{
			try {
				br.close();
			} catch (IOException e) {
				// NOP
			}
		}
	}

} public class Main{
	public static void main(String[] args){
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		try {
			ArrayList<String> list = new ArrayList<String>();
			int N =Integer.parseInt(br.readLine());
			String pre = br.readLine();
			list.add(pre);
			for(int i=1;i<N;i++){
				String post = br.readLine();
				if(list.contains(post)){
					System.out.println("No");
					return;
				}
				if(pre.charAt(pre.length()-1) != post.charAt(0)){
					System.out.println("No");
                                        return;
				}
				list.add(post);
				pre = post;
			}
			System.out.println("Yes");
		} catch (IOException e) {
			e.printStackTrace();
		}finally{
			try {
				br.close();
			} catch (IOException e) {
				// NOP
			}
		}
	}

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;

public class Main{
	public static void main(String[] args){
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		try {
			ArrayList<String> list = new ArrayList<String>();
			int N =Integer.parseInt(br.readLine());
			String pre = br.readLine();
			list.add(pre);
			for(int i=1;i<N;i++){
				String post = br.readLine();
				if(list.contains(post)){
					System.out.println("No");
					return;
				}
				if(pre.charAt(pre.length()-1) != post.charAt(0)){
					System.out.println("No");
                                        return;
				}
				list.add(post);
				pre = post;
			}
			System.out.println("Yes");
		} catch (IOException e) {
			e.printStackTrace();
		}finally{
			try {
				br.close();
			} catch (IOException e) {
				// NOP
			}
		}
	}

}
