import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Set;

public class Main {

  public static void main(String[] args) {
    
    new Main().run();
  }
  public void run() {

    try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {

      int n = Integer.parseInt(br.readLine());

      String line = br.readLine();
      String next;
      Set<String> set = new HashSet<>();
      set.add(line);
      String ans = "Yes";
      for(int i=1; i<n; i++) {
        next = br.readLine();

        if(!set.add(next)){
          ans = "No";
          break;
        }

        if(next.startsWith(line.substring(line.length()-1))) {
          line = next;
          continue;
        }
        else {
          ans = "No";
          break;
        }
      }

      System.out.println(ans);
    }
    catch(IOException e) {
      System.err.println(e);
    }
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.HashSet; HashSet java.util import java.util.Set; Set java.util public class Main {

  public static void main(String[] args) {
    
    new Main().run();
  }
  public void run() {

    try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {

      int n = Integer.parseInt(br.readLine());

      String line = br.readLine();
      String next;
      Set<String> set = new HashSet<>();
      set.add(line);
      String ans = "Yes";
      for(int i=1; i<n; i++) {
        next = br.readLine();

        if(!set.add(next)){
          ans = "No";
          break;
        }

        if(next.startsWith(line.substring(line.length()-1))) {
          line = next;
          continue;
        }
        else {
          ans = "No";
          break;
        }
      }

      System.out.println(ans);
    }
    catch(IOException e) {
      System.err.println(e);
    }
  }
} Main public static void main(String[] args) {
    
    new Main().run();
  } main {
    
    new Main().run();
  } new Main().run() new Main().run new Main() String[] args args public void run() {

    try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {

      int n = Integer.parseInt(br.readLine());

      String line = br.readLine();
      String next;
      Set<String> set = new HashSet<>();
      set.add(line);
      String ans = "Yes";
      for(int i=1; i<n; i++) {
        next = br.readLine();

        if(!set.add(next)){
          ans = "No";
          break;
        }

        if(next.startsWith(line.substring(line.length()-1))) {
          line = next;
          continue;
        }
        else {
          ans = "No";
          break;
        }
      }

      System.out.println(ans);
    }
    catch(IOException e) {
      System.err.println(e);
    }
  } run {

    try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {

      int n = Integer.parseInt(br.readLine());

      String line = br.readLine();
      String next;
      Set<String> set = new HashSet<>();
      set.add(line);
      String ans = "Yes";
      for(int i=1; i<n; i++) {
        next = br.readLine();

        if(!set.add(next)){
          ans = "No";
          break;
        }

        if(next.startsWith(line.substring(line.length()-1))) {
          line = next;
          continue;
        }
        else {
          ans = "No";
          break;
        }
      }

      System.out.println(ans);
    }
    catch(IOException e) {
      System.err.println(e);
    }
  } try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {

      int n = Integer.parseInt(br.readLine());

      String line = br.readLine();
      String next;
      Set<String> set = new HashSet<>();
      set.add(line);
      String ans = "Yes";
      for(int i=1; i<n; i++) {
        next = br.readLine();

        if(!set.add(next)){
          ans = "No";
          break;
        }

        if(next.startsWith(line.substring(line.length()-1))) {
          line = next;
          continue;
        }
        else {
          ans = "No";
          break;
        }
      }

      System.out.println(ans);
    }
    catch(IOException e) {
      System.err.println(e);
    } catch(IOException e) {
      System.err.println(e);
    } IOException e {
      System.err.println(e);
    } System.err.println(e) System.err.println System.err System System.err e {

      int n = Integer.parseInt(br.readLine());

      String line = br.readLine();
      String next;
      Set<String> set = new HashSet<>();
      set.add(line);
      String ans = "Yes";
      for(int i=1; i<n; i++) {
        next = br.readLine();

        if(!set.add(next)){
          ans = "No";
          break;
        }

        if(next.startsWith(line.substring(line.length()-1))) {
          line = next;
          continue;
        }
        else {
          ans = "No";
          break;
        }
      }

      System.out.println(ans);
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(br.readLine()); n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br String line = br.readLine(); line br.readLine() br.readLine br String next; next Set<String> set = new HashSet<>(); set new HashSet<>() set.add(line) set.add set line String ans = "Yes"; ans "Yes" for(int i=1; i<n; i++) {
        next = br.readLine();

        if(!set.add(next)){
          ans = "No";
          break;
        }

        if(next.startsWith(line.substring(line.length()-1))) {
          line = next;
          continue;
        }
        else {
          ans = "No";
          break;
        }
      } int i=1; int i=1; i 1 i<n i n i++ i++ i {
        next = br.readLine();

        if(!set.add(next)){
          ans = "No";
          break;
        }

        if(next.startsWith(line.substring(line.length()-1))) {
          line = next;
          continue;
        }
        else {
          ans = "No";
          break;
        }
      } {
        next = br.readLine();

        if(!set.add(next)){
          ans = "No";
          break;
        }

        if(next.startsWith(line.substring(line.length()-1))) {
          line = next;
          continue;
        }
        else {
          ans = "No";
          break;
        }
      } next = br.readLine() next br.readLine() br.readLine br if(!set.add(next)){
          ans = "No";
          break;
        } !set.add(next) set.add(next) set.add set next {
          ans = "No";
          break;
        } ans = "No" ans "No" break; if(next.startsWith(line.substring(line.length()-1))) {
          line = next;
          continue;
        }
        else {
          ans = "No";
          break;
        } next.startsWith(line.substring(line.length()-1)) next.startsWith next line.substring(line.length()-1) line.substring line line.length()-1 line.length() line.length line 1 {
          line = next;
          continue;
        } line = next line next continue; {
          ans = "No";
          break;
        } ans = "No" ans "No" break; System.out.println(ans) System.out.println System.out System System.out ans public class Main {

  public static void main(String[] args) {
    
    new Main().run();
  }
  public void run() {

    try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {

      int n = Integer.parseInt(br.readLine());

      String line = br.readLine();
      String next;
      Set<String> set = new HashSet<>();
      set.add(line);
      String ans = "Yes";
      for(int i=1; i<n; i++) {
        next = br.readLine();

        if(!set.add(next)){
          ans = "No";
          break;
        }

        if(next.startsWith(line.substring(line.length()-1))) {
          line = next;
          continue;
        }
        else {
          ans = "No";
          break;
        }
      }

      System.out.println(ans);
    }
    catch(IOException e) {
      System.err.println(e);
    }
  }
} public class Main {

  public static void main(String[] args) {
    
    new Main().run();
  }
  public void run() {

    try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {

      int n = Integer.parseInt(br.readLine());

      String line = br.readLine();
      String next;
      Set<String> set = new HashSet<>();
      set.add(line);
      String ans = "Yes";
      for(int i=1; i<n; i++) {
        next = br.readLine();

        if(!set.add(next)){
          ans = "No";
          break;
        }

        if(next.startsWith(line.substring(line.length()-1))) {
          line = next;
          continue;
        }
        else {
          ans = "No";
          break;
        }
      }

      System.out.println(ans);
    }
    catch(IOException e) {
      System.err.println(e);
    }
  }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Set;

public class Main {

  public static void main(String[] args) {
    
    new Main().run();
  }
  public void run() {

    try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {

      int n = Integer.parseInt(br.readLine());

      String line = br.readLine();
      String next;
      Set<String> set = new HashSet<>();
      set.add(line);
      String ans = "Yes";
      for(int i=1; i<n; i++) {
        next = br.readLine();

        if(!set.add(next)){
          ans = "No";
          break;
        }

        if(next.startsWith(line.substring(line.length()-1))) {
          line = next;
          continue;
        }
        else {
          ans = "No";
          break;
        }
      }

      System.out.println(ans);
    }
    catch(IOException e) {
      System.err.println(e);
    }
  }
}