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

class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int n;
    n = Integer.parseInt(sc.next());
    List<String> L = new ArrayList<String>();
    String s,last = new String();
    boolean b = true;
    
    L.add(sc.next());
    for(int i=1; i<n; i++){
      last = L.get(L.size()-1); s = sc.next();
      if(L.contains(s)){b=false; System.out.println("No"); break;}
      else if(last.charAt(last.length()-1)!=s.charAt(0)){b=false; System.out.println("No"); break;}
      else{L.add(s);}
    }
    
    if(b){System.out.println("Yes");}
  }
} import java.util.Scanner; Scanner java.util import java.util.List; List java.util import java.util.ArrayList; ArrayList java.util class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int n;
    n = Integer.parseInt(sc.next());
    List<String> L = new ArrayList<String>();
    String s,last = new String();
    boolean b = true;
    
    L.add(sc.next());
    for(int i=1; i<n; i++){
      last = L.get(L.size()-1); s = sc.next();
      if(L.contains(s)){b=false; System.out.println("No"); break;}
      else if(last.charAt(last.length()-1)!=s.charAt(0)){b=false; System.out.println("No"); break;}
      else{L.add(s);}
    }
    
    if(b){System.out.println("Yes");}
  }
} Main public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int n;
    n = Integer.parseInt(sc.next());
    List<String> L = new ArrayList<String>();
    String s,last = new String();
    boolean b = true;
    
    L.add(sc.next());
    for(int i=1; i<n; i++){
      last = L.get(L.size()-1); s = sc.next();
      if(L.contains(s)){b=false; System.out.println("No"); break;}
      else if(last.charAt(last.length()-1)!=s.charAt(0)){b=false; System.out.println("No"); break;}
      else{L.add(s);}
    }
    
    if(b){System.out.println("Yes");}
  } main {
    Scanner sc = new Scanner(System.in);
    int n;
    n = Integer.parseInt(sc.next());
    List<String> L = new ArrayList<String>();
    String s,last = new String();
    boolean b = true;
    
    L.add(sc.next());
    for(int i=1; i<n; i++){
      last = L.get(L.size()-1); s = sc.next();
      if(L.contains(s)){b=false; System.out.println("No"); break;}
      else if(last.charAt(last.length()-1)!=s.charAt(0)){b=false; System.out.println("No"); break;}
      else{L.add(s);}
    }
    
    if(b){System.out.println("Yes");}
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n; n n = Integer.parseInt(sc.next()) n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc List<String> L = new ArrayList<String>(); L new ArrayList<String>() String s s last = new String(); last new String() boolean b = true; b true L.add(sc.next()) L.add L sc.next() sc.next sc for(int i=1; i<n; i++){
      last = L.get(L.size()-1); s = sc.next();
      if(L.contains(s)){b=false; System.out.println("No"); break;}
      else if(last.charAt(last.length()-1)!=s.charAt(0)){b=false; System.out.println("No"); break;}
      else{L.add(s);}
    } int i=1; int i=1; i 1 i<n i n i++ i++ i {
      last = L.get(L.size()-1); s = sc.next();
      if(L.contains(s)){b=false; System.out.println("No"); break;}
      else if(last.charAt(last.length()-1)!=s.charAt(0)){b=false; System.out.println("No"); break;}
      else{L.add(s);}
    } {
      last = L.get(L.size()-1); s = sc.next();
      if(L.contains(s)){b=false; System.out.println("No"); break;}
      else if(last.charAt(last.length()-1)!=s.charAt(0)){b=false; System.out.println("No"); break;}
      else{L.add(s);}
    } last = L.get(L.size()-1) last L.get(L.size()-1) L.get L L.size()-1 L.size() L.size L 1 s = sc.next() s sc.next() sc.next sc if(L.contains(s)){b=false; System.out.println("No"); break;}
      else if(last.charAt(last.length()-1)!=s.charAt(0)){b=false; System.out.println("No"); break;}
      else{L.add(s);} L.contains(s) L.contains L s {b=false; System.out.println("No"); break;} b=false b false System.out.println("No") System.out.println System.out System System.out "No" break; if(last.charAt(last.length()-1)!=s.charAt(0)){b=false; System.out.println("No"); break;}
      else{L.add(s);} last.charAt(last.length()-1)!=s.charAt(0) last.charAt(last.length()-1) last.charAt last last.length()-1 last.length() last.length last 1 s.charAt(0) s.charAt s 0 {b=false; System.out.println("No"); break;} b=false b false System.out.println("No") System.out.println System.out System System.out "No" break; {L.add(s);} L.add(s) L.add L s if(b){System.out.println("Yes");} b {System.out.println("Yes");} System.out.println("Yes") System.out.println System.out System System.out "Yes" String args[] args
import java.util.Scanner;
import java.util.List;
import java.util.ArrayList;

class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int n;
    n = Integer.parseInt(sc.next());
    List<String> L = new ArrayList<String>();
    String s,last = new String();
    boolean b = true;
    
    L.add(sc.next());
    for(int i=1; i<n; i++){
      last = L.get(L.size()-1); s = sc.next();
      if(L.contains(s)){b=false; System.out.println("No"); break;}
      else if(last.charAt(last.length()-1)!=s.charAt(0)){b=false; System.out.println("No"); break;}
      else{L.add(s);}
    }
    
    if(b){System.out.println("Yes");}
  }
}