import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int N = scanner.nextInt();
    HashSet<String> words = new HashSet<>();
    String lastWord = scanner.next();
    words.add(lastWord);
    for (int i = 1; i < N; ++i) {
      String word = scanner.next();
      if (word.charAt(0) != lastWord.charAt(lastWord.length() - 1)) {
        System.out.println("No");
        return;
      }
      if (words.contains(word)) {
        System.out.println("No");
        return;
      }
      lastWord = word;
      words.add(word);
    }
    System.out.println("Yes");
    return;
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int N = scanner.nextInt();
    HashSet<String> words = new HashSet<>();
    String lastWord = scanner.next();
    words.add(lastWord);
    for (int i = 1; i < N; ++i) {
      String word = scanner.next();
      if (word.charAt(0) != lastWord.charAt(lastWord.length() - 1)) {
        System.out.println("No");
        return;
      }
      if (words.contains(word)) {
        System.out.println("No");
        return;
      }
      lastWord = word;
      words.add(word);
    }
    System.out.println("Yes");
    return;
  }
} Main public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int N = scanner.nextInt();
    HashSet<String> words = new HashSet<>();
    String lastWord = scanner.next();
    words.add(lastWord);
    for (int i = 1; i < N; ++i) {
      String word = scanner.next();
      if (word.charAt(0) != lastWord.charAt(lastWord.length() - 1)) {
        System.out.println("No");
        return;
      }
      if (words.contains(word)) {
        System.out.println("No");
        return;
      }
      lastWord = word;
      words.add(word);
    }
    System.out.println("Yes");
    return;
  } main {
    Scanner scanner = new Scanner(System.in);
    int N = scanner.nextInt();
    HashSet<String> words = new HashSet<>();
    String lastWord = scanner.next();
    words.add(lastWord);
    for (int i = 1; i < N; ++i) {
      String word = scanner.next();
      if (word.charAt(0) != lastWord.charAt(lastWord.length() - 1)) {
        System.out.println("No");
        return;
      }
      if (words.contains(word)) {
        System.out.println("No");
        return;
      }
      lastWord = word;
      words.add(word);
    }
    System.out.println("Yes");
    return;
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner HashSet<String> words = new HashSet<>(); words new HashSet<>() String lastWord = scanner.next(); lastWord scanner.next() scanner.next scanner words.add(lastWord) words.add words lastWord for (int i = 1; i < N; ++i) {
      String word = scanner.next();
      if (word.charAt(0) != lastWord.charAt(lastWord.length() - 1)) {
        System.out.println("No");
        return;
      }
      if (words.contains(word)) {
        System.out.println("No");
        return;
      }
      lastWord = word;
      words.add(word);
    } int i = 1; int i = 1; i 1 i < N i N ++i ++i i {
      String word = scanner.next();
      if (word.charAt(0) != lastWord.charAt(lastWord.length() - 1)) {
        System.out.println("No");
        return;
      }
      if (words.contains(word)) {
        System.out.println("No");
        return;
      }
      lastWord = word;
      words.add(word);
    } {
      String word = scanner.next();
      if (word.charAt(0) != lastWord.charAt(lastWord.length() - 1)) {
        System.out.println("No");
        return;
      }
      if (words.contains(word)) {
        System.out.println("No");
        return;
      }
      lastWord = word;
      words.add(word);
    } String word = scanner.next(); word scanner.next() scanner.next scanner if (word.charAt(0) != lastWord.charAt(lastWord.length() - 1)) {
        System.out.println("No");
        return;
      } word.charAt(0) != lastWord.charAt(lastWord.length() - 1) word.charAt(0) word.charAt word 0 lastWord.charAt(lastWord.length() - 1) lastWord.charAt lastWord lastWord.length() - 1 lastWord.length() lastWord.length lastWord 1 {
        System.out.println("No");
        return;
      } System.out.println("No") System.out.println System.out System System.out "No" return; if (words.contains(word)) {
        System.out.println("No");
        return;
      } words.contains(word) words.contains words word {
        System.out.println("No");
        return;
      } System.out.println("No") System.out.println System.out System System.out "No" return; lastWord = word lastWord word words.add(word) words.add words word System.out.println("Yes") System.out.println System.out System System.out "Yes" return; String[] args args public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int N = scanner.nextInt();
    HashSet<String> words = new HashSet<>();
    String lastWord = scanner.next();
    words.add(lastWord);
    for (int i = 1; i < N; ++i) {
      String word = scanner.next();
      if (word.charAt(0) != lastWord.charAt(lastWord.length() - 1)) {
        System.out.println("No");
        return;
      }
      if (words.contains(word)) {
        System.out.println("No");
        return;
      }
      lastWord = word;
      words.add(word);
    }
    System.out.println("Yes");
    return;
  }
} public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int N = scanner.nextInt();
    HashSet<String> words = new HashSet<>();
    String lastWord = scanner.next();
    words.add(lastWord);
    for (int i = 1; i < N; ++i) {
      String word = scanner.next();
      if (word.charAt(0) != lastWord.charAt(lastWord.length() - 1)) {
        System.out.println("No");
        return;
      }
      if (words.contains(word)) {
        System.out.println("No");
        return;
      }
      lastWord = word;
      words.add(word);
    }
    System.out.println("Yes");
    return;
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int N = scanner.nextInt();
    HashSet<String> words = new HashSet<>();
    String lastWord = scanner.next();
    words.add(lastWord);
    for (int i = 1; i < N; ++i) {
      String word = scanner.next();
      if (word.charAt(0) != lastWord.charAt(lastWord.length() - 1)) {
        System.out.println("No");
        return;
      }
      if (words.contains(word)) {
        System.out.println("No");
        return;
      }
      lastWord = word;
      words.add(word);
    }
    System.out.println("Yes");
    return;
  }
}