import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	// 109-B
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		try {
			String inputLine = sc.nextLine();
			int n = Integer.parseInt(inputLine);
			List<String> wordList = new ArrayList<String>(n);
			String lastWord = null;
			for(int i = 0; i < n; i++)
			{
				inputLine = sc.nextLine();
				if (lastWord != null && !inputLine.startsWith(lastWord))
				{
					System.out.println("No");
					return;
				}
				else if (wordList.indexOf(inputLine) != -1)
				{
					System.out.println("No");
					return;
				}
				else
				{
					lastWord = inputLine.substring(inputLine.length() - 1, inputLine.length());
					wordList.add(inputLine);
				}
			}
			System.out.println("Yes");

		} catch (Exception e) {
			System.out.println("Input Error");
		} finally {
			sc.close();
		}
	}
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {

	// 109-B
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		try {
			String inputLine = sc.nextLine();
			int n = Integer.parseInt(inputLine);
			List<String> wordList = new ArrayList<String>(n);
			String lastWord = null;
			for(int i = 0; i < n; i++)
			{
				inputLine = sc.nextLine();
				if (lastWord != null && !inputLine.startsWith(lastWord))
				{
					System.out.println("No");
					return;
				}
				else if (wordList.indexOf(inputLine) != -1)
				{
					System.out.println("No");
					return;
				}
				else
				{
					lastWord = inputLine.substring(inputLine.length() - 1, inputLine.length());
					wordList.add(inputLine);
				}
			}
			System.out.println("Yes");

		} catch (Exception e) {
			System.out.println("Input Error");
		} finally {
			sc.close();
		}
	}
} Main // 109-B
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		try {
			String inputLine = sc.nextLine();
			int n = Integer.parseInt(inputLine);
			List<String> wordList = new ArrayList<String>(n);
			String lastWord = null;
			for(int i = 0; i < n; i++)
			{
				inputLine = sc.nextLine();
				if (lastWord != null && !inputLine.startsWith(lastWord))
				{
					System.out.println("No");
					return;
				}
				else if (wordList.indexOf(inputLine) != -1)
				{
					System.out.println("No");
					return;
				}
				else
				{
					lastWord = inputLine.substring(inputLine.length() - 1, inputLine.length());
					wordList.add(inputLine);
				}
			}
			System.out.println("Yes");

		} catch (Exception e) {
			System.out.println("Input Error");
		} finally {
			sc.close();
		}
	} main {
		Scanner sc = new Scanner(System.in);
		try {
			String inputLine = sc.nextLine();
			int n = Integer.parseInt(inputLine);
			List<String> wordList = new ArrayList<String>(n);
			String lastWord = null;
			for(int i = 0; i < n; i++)
			{
				inputLine = sc.nextLine();
				if (lastWord != null && !inputLine.startsWith(lastWord))
				{
					System.out.println("No");
					return;
				}
				else if (wordList.indexOf(inputLine) != -1)
				{
					System.out.println("No");
					return;
				}
				else
				{
					lastWord = inputLine.substring(inputLine.length() - 1, inputLine.length());
					wordList.add(inputLine);
				}
			}
			System.out.println("Yes");

		} catch (Exception e) {
			System.out.println("Input Error");
		} finally {
			sc.close();
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) try {
			String inputLine = sc.nextLine();
			int n = Integer.parseInt(inputLine);
			List<String> wordList = new ArrayList<String>(n);
			String lastWord = null;
			for(int i = 0; i < n; i++)
			{
				inputLine = sc.nextLine();
				if (lastWord != null && !inputLine.startsWith(lastWord))
				{
					System.out.println("No");
					return;
				}
				else if (wordList.indexOf(inputLine) != -1)
				{
					System.out.println("No");
					return;
				}
				else
				{
					lastWord = inputLine.substring(inputLine.length() - 1, inputLine.length());
					wordList.add(inputLine);
				}
			}
			System.out.println("Yes");

		} catch (Exception e) {
			System.out.println("Input Error");
		} finally {
			sc.close();
		} catch (Exception e) {
			System.out.println("Input Error");
		} Exception e {
			System.out.println("Input Error");
		} System.out.println("Input Error") System.out.println System.out System System.out "Input Error" {
			sc.close();
		} sc.close() sc.close sc {
			String inputLine = sc.nextLine();
			int n = Integer.parseInt(inputLine);
			List<String> wordList = new ArrayList<String>(n);
			String lastWord = null;
			for(int i = 0; i < n; i++)
			{
				inputLine = sc.nextLine();
				if (lastWord != null && !inputLine.startsWith(lastWord))
				{
					System.out.println("No");
					return;
				}
				else if (wordList.indexOf(inputLine) != -1)
				{
					System.out.println("No");
					return;
				}
				else
				{
					lastWord = inputLine.substring(inputLine.length() - 1, inputLine.length());
					wordList.add(inputLine);
				}
			}
			System.out.println("Yes");

		} String inputLine = sc.nextLine(); inputLine sc.nextLine() sc.nextLine sc int n = Integer.parseInt(inputLine); n Integer.parseInt(inputLine) Integer.parseInt Integer inputLine List<String> wordList = new ArrayList<String>(n); wordList new ArrayList<String>(n) String lastWord = null; lastWord null for(int i = 0; i < n; i++)
			{
				inputLine = sc.nextLine();
				if (lastWord != null && !inputLine.startsWith(lastWord))
				{
					System.out.println("No");
					return;
				}
				else if (wordList.indexOf(inputLine) != -1)
				{
					System.out.println("No");
					return;
				}
				else
				{
					lastWord = inputLine.substring(inputLine.length() - 1, inputLine.length());
					wordList.add(inputLine);
				}
			} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
				inputLine = sc.nextLine();
				if (lastWord != null && !inputLine.startsWith(lastWord))
				{
					System.out.println("No");
					return;
				}
				else if (wordList.indexOf(inputLine) != -1)
				{
					System.out.println("No");
					return;
				}
				else
				{
					lastWord = inputLine.substring(inputLine.length() - 1, inputLine.length());
					wordList.add(inputLine);
				}
			} {
				inputLine = sc.nextLine();
				if (lastWord != null && !inputLine.startsWith(lastWord))
				{
					System.out.println("No");
					return;
				}
				else if (wordList.indexOf(inputLine) != -1)
				{
					System.out.println("No");
					return;
				}
				else
				{
					lastWord = inputLine.substring(inputLine.length() - 1, inputLine.length());
					wordList.add(inputLine);
				}
			} inputLine = sc.nextLine() inputLine sc.nextLine() sc.nextLine sc if (lastWord != null && !inputLine.startsWith(lastWord))
				{
					System.out.println("No");
					return;
				}
				else if (wordList.indexOf(inputLine) != -1)
				{
					System.out.println("No");
					return;
				}
				else
				{
					lastWord = inputLine.substring(inputLine.length() - 1, inputLine.length());
					wordList.add(inputLine);
				} lastWord != null && !inputLine.startsWith(lastWord) lastWord != null lastWord null !inputLine.startsWith(lastWord) inputLine.startsWith(lastWord) inputLine.startsWith inputLine lastWord {
					System.out.println("No");
					return;
				} System.out.println("No") System.out.println System.out System System.out "No" return; if (wordList.indexOf(inputLine) != -1)
				{
					System.out.println("No");
					return;
				}
				else
				{
					lastWord = inputLine.substring(inputLine.length() - 1, inputLine.length());
					wordList.add(inputLine);
				} wordList.indexOf(inputLine) != -1 wordList.indexOf(inputLine) wordList.indexOf wordList inputLine -1 1 {
					System.out.println("No");
					return;
				} System.out.println("No") System.out.println System.out System System.out "No" return; {
					lastWord = inputLine.substring(inputLine.length() - 1, inputLine.length());
					wordList.add(inputLine);
				} lastWord = inputLine.substring(inputLine.length() - 1, inputLine.length()) lastWord inputLine.substring(inputLine.length() - 1, inputLine.length()) inputLine.substring inputLine inputLine.length() - 1 inputLine.length() inputLine.length inputLine 1 inputLine.length() inputLine.length inputLine wordList.add(inputLine) wordList.add wordList inputLine System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args public class Main {

	// 109-B
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		try {
			String inputLine = sc.nextLine();
			int n = Integer.parseInt(inputLine);
			List<String> wordList = new ArrayList<String>(n);
			String lastWord = null;
			for(int i = 0; i < n; i++)
			{
				inputLine = sc.nextLine();
				if (lastWord != null && !inputLine.startsWith(lastWord))
				{
					System.out.println("No");
					return;
				}
				else if (wordList.indexOf(inputLine) != -1)
				{
					System.out.println("No");
					return;
				}
				else
				{
					lastWord = inputLine.substring(inputLine.length() - 1, inputLine.length());
					wordList.add(inputLine);
				}
			}
			System.out.println("Yes");

		} catch (Exception e) {
			System.out.println("Input Error");
		} finally {
			sc.close();
		}
	}
} public class Main {

	// 109-B
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		try {
			String inputLine = sc.nextLine();
			int n = Integer.parseInt(inputLine);
			List<String> wordList = new ArrayList<String>(n);
			String lastWord = null;
			for(int i = 0; i < n; i++)
			{
				inputLine = sc.nextLine();
				if (lastWord != null && !inputLine.startsWith(lastWord))
				{
					System.out.println("No");
					return;
				}
				else if (wordList.indexOf(inputLine) != -1)
				{
					System.out.println("No");
					return;
				}
				else
				{
					lastWord = inputLine.substring(inputLine.length() - 1, inputLine.length());
					wordList.add(inputLine);
				}
			}
			System.out.println("Yes");

		} catch (Exception e) {
			System.out.println("Input Error");
		} finally {
			sc.close();
		}
	}
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	// 109-B
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		try {
			String inputLine = sc.nextLine();
			int n = Integer.parseInt(inputLine);
			List<String> wordList = new ArrayList<String>(n);
			String lastWord = null;
			for(int i = 0; i < n; i++)
			{
				inputLine = sc.nextLine();
				if (lastWord != null && !inputLine.startsWith(lastWord))
				{
					System.out.println("No");
					return;
				}
				else if (wordList.indexOf(inputLine) != -1)
				{
					System.out.println("No");
					return;
				}
				else
				{
					lastWord = inputLine.substring(inputLine.length() - 1, inputLine.length());
					wordList.add(inputLine);
				}
			}
			System.out.println("Yes");

		} catch (Exception e) {
			System.out.println("Input Error");
		} finally {
			sc.close();
		}
	}
}