import java.util.Scanner;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;

public class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    ArrayList<String> list = new ArrayList<>();
    ArrayList<String> anslist = new ArrayList<>();    
    int n = sc.nextInt();
    String[] a = new String[n];
    int max = 1;
    int count = 1;
    for(int i = 0;i < n;i++){
      a[i] = sc.next();
      list.add(a[i]);
    }
    Collections.sort(list);
    for(int j = 1;j < n;j++){
      if(list.get(j - 1).equals(list.get(j))){
        count++;
        if(j == n - 1) max = Math.max(max,count);
      }else{
        max = Math.max(max,count);
        count = 1;  
      }
    }
    for(int x = 0;x < n - max + 1;x++){
      if(list.get(x + max - 1).equals(list.get(x))){
        anslist.add(list.get(x));
      }
    }
    Iterator<String> it = anslist.iterator();
    while(it.hasNext()){
      System.out.println(it.next());
    }
  }
} import java.util.Scanner; Scanner java.util import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.Iterator; Iterator java.util public class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    ArrayList<String> list = new ArrayList<>();
    ArrayList<String> anslist = new ArrayList<>();    
    int n = sc.nextInt();
    String[] a = new String[n];
    int max = 1;
    int count = 1;
    for(int i = 0;i < n;i++){
      a[i] = sc.next();
      list.add(a[i]);
    }
    Collections.sort(list);
    for(int j = 1;j < n;j++){
      if(list.get(j - 1).equals(list.get(j))){
        count++;
        if(j == n - 1) max = Math.max(max,count);
      }else{
        max = Math.max(max,count);
        count = 1;  
      }
    }
    for(int x = 0;x < n - max + 1;x++){
      if(list.get(x + max - 1).equals(list.get(x))){
        anslist.add(list.get(x));
      }
    }
    Iterator<String> it = anslist.iterator();
    while(it.hasNext()){
      System.out.println(it.next());
    }
  }
} Main public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    ArrayList<String> list = new ArrayList<>();
    ArrayList<String> anslist = new ArrayList<>();    
    int n = sc.nextInt();
    String[] a = new String[n];
    int max = 1;
    int count = 1;
    for(int i = 0;i < n;i++){
      a[i] = sc.next();
      list.add(a[i]);
    }
    Collections.sort(list);
    for(int j = 1;j < n;j++){
      if(list.get(j - 1).equals(list.get(j))){
        count++;
        if(j == n - 1) max = Math.max(max,count);
      }else{
        max = Math.max(max,count);
        count = 1;  
      }
    }
    for(int x = 0;x < n - max + 1;x++){
      if(list.get(x + max - 1).equals(list.get(x))){
        anslist.add(list.get(x));
      }
    }
    Iterator<String> it = anslist.iterator();
    while(it.hasNext()){
      System.out.println(it.next());
    }
  } main {
    Scanner sc = new Scanner(System.in);
    ArrayList<String> list = new ArrayList<>();
    ArrayList<String> anslist = new ArrayList<>();    
    int n = sc.nextInt();
    String[] a = new String[n];
    int max = 1;
    int count = 1;
    for(int i = 0;i < n;i++){
      a[i] = sc.next();
      list.add(a[i]);
    }
    Collections.sort(list);
    for(int j = 1;j < n;j++){
      if(list.get(j - 1).equals(list.get(j))){
        count++;
        if(j == n - 1) max = Math.max(max,count);
      }else{
        max = Math.max(max,count);
        count = 1;  
      }
    }
    for(int x = 0;x < n - max + 1;x++){
      if(list.get(x + max - 1).equals(list.get(x))){
        anslist.add(list.get(x));
      }
    }
    Iterator<String> it = anslist.iterator();
    while(it.hasNext()){
      System.out.println(it.next());
    }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) ArrayList<String> list = new ArrayList<>(); list new ArrayList<>() ArrayList<String> anslist = new ArrayList<>(); anslist new ArrayList<>() int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc String[] a = new String[n]; a new String[n] n int max = 1; max 1 int count = 1; count 1 for(int i = 0;i < n;i++){
      a[i] = sc.next();
      list.add(a[i]);
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      a[i] = sc.next();
      list.add(a[i]);
    } {
      a[i] = sc.next();
      list.add(a[i]);
    } a[i] = sc.next() a[i] a i sc.next() sc.next sc list.add(a[i]) list.add list a[i] a i Collections.sort(list) Collections.sort Collections list for(int j = 1;j < n;j++){
      if(list.get(j - 1).equals(list.get(j))){
        count++;
        if(j == n - 1) max = Math.max(max,count);
      }else{
        max = Math.max(max,count);
        count = 1;  
      }
    } int j = 1; int j = 1; j 1 j < n j n j++ j++ j {
      if(list.get(j - 1).equals(list.get(j))){
        count++;
        if(j == n - 1) max = Math.max(max,count);
      }else{
        max = Math.max(max,count);
        count = 1;  
      }
    } {
      if(list.get(j - 1).equals(list.get(j))){
        count++;
        if(j == n - 1) max = Math.max(max,count);
      }else{
        max = Math.max(max,count);
        count = 1;  
      }
    } if(list.get(j - 1).equals(list.get(j))){
        count++;
        if(j == n - 1) max = Math.max(max,count);
      }else{
        max = Math.max(max,count);
        count = 1;  
      } list.get(j - 1).equals(list.get(j)) list.get(j - 1).equals list.get(j - 1) list.get list j - 1 j 1 list.get(j) list.get list j {
        count++;
        if(j == n - 1) max = Math.max(max,count);
      } count++ count if(j == n - 1) max = Math.max(max,count); j == n - 1 j n - 1 n 1 max = Math.max(max,count) max Math.max(max,count) Math.max Math max count {
        max = Math.max(max,count);
        count = 1;  
      } max = Math.max(max,count) max Math.max(max,count) Math.max Math max count count = 1 count 1 for(int x = 0;x < n - max + 1;x++){
      if(list.get(x + max - 1).equals(list.get(x))){
        anslist.add(list.get(x));
      }
    } int x = 0; int x = 0; x 0 x < n - max + 1 x n - max + 1 n - max n max 1 x++ x++ x {
      if(list.get(x + max - 1).equals(list.get(x))){
        anslist.add(list.get(x));
      }
    } {
      if(list.get(x + max - 1).equals(list.get(x))){
        anslist.add(list.get(x));
      }
    } if(list.get(x + max - 1).equals(list.get(x))){
        anslist.add(list.get(x));
      } list.get(x + max - 1).equals(list.get(x)) list.get(x + max - 1).equals list.get(x + max - 1) list.get list x + max - 1 x + max x max 1 list.get(x) list.get list x {
        anslist.add(list.get(x));
      } anslist.add(list.get(x)) anslist.add anslist list.get(x) list.get list x Iterator<String> it = anslist.iterator(); it anslist.iterator() anslist.iterator anslist while(it.hasNext()){
      System.out.println(it.next());
    } it.hasNext() it.hasNext it {
      System.out.println(it.next());
    } System.out.println(it.next()) System.out.println System.out System System.out it.next() it.next it String args[] args public class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    ArrayList<String> list = new ArrayList<>();
    ArrayList<String> anslist = new ArrayList<>();    
    int n = sc.nextInt();
    String[] a = new String[n];
    int max = 1;
    int count = 1;
    for(int i = 0;i < n;i++){
      a[i] = sc.next();
      list.add(a[i]);
    }
    Collections.sort(list);
    for(int j = 1;j < n;j++){
      if(list.get(j - 1).equals(list.get(j))){
        count++;
        if(j == n - 1) max = Math.max(max,count);
      }else{
        max = Math.max(max,count);
        count = 1;  
      }
    }
    for(int x = 0;x < n - max + 1;x++){
      if(list.get(x + max - 1).equals(list.get(x))){
        anslist.add(list.get(x));
      }
    }
    Iterator<String> it = anslist.iterator();
    while(it.hasNext()){
      System.out.println(it.next());
    }
  }
} public class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    ArrayList<String> list = new ArrayList<>();
    ArrayList<String> anslist = new ArrayList<>();    
    int n = sc.nextInt();
    String[] a = new String[n];
    int max = 1;
    int count = 1;
    for(int i = 0;i < n;i++){
      a[i] = sc.next();
      list.add(a[i]);
    }
    Collections.sort(list);
    for(int j = 1;j < n;j++){
      if(list.get(j - 1).equals(list.get(j))){
        count++;
        if(j == n - 1) max = Math.max(max,count);
      }else{
        max = Math.max(max,count);
        count = 1;  
      }
    }
    for(int x = 0;x < n - max + 1;x++){
      if(list.get(x + max - 1).equals(list.get(x))){
        anslist.add(list.get(x));
      }
    }
    Iterator<String> it = anslist.iterator();
    while(it.hasNext()){
      System.out.println(it.next());
    }
  }
} Main
import java.util.Scanner;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;

public class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    ArrayList<String> list = new ArrayList<>();
    ArrayList<String> anslist = new ArrayList<>();    
    int n = sc.nextInt();
    String[] a = new String[n];
    int max = 1;
    int count = 1;
    for(int i = 0;i < n;i++){
      a[i] = sc.next();
      list.add(a[i]);
    }
    Collections.sort(list);
    for(int j = 1;j < n;j++){
      if(list.get(j - 1).equals(list.get(j))){
        count++;
        if(j == n - 1) max = Math.max(max,count);
      }else{
        max = Math.max(max,count);
        count = 1;  
      }
    }
    for(int x = 0;x < n - max + 1;x++){
      if(list.get(x + max - 1).equals(list.get(x))){
        anslist.add(list.get(x));
      }
    }
    Iterator<String> it = anslist.iterator();
    while(it.hasNext()){
      System.out.println(it.next());
    }
  }
}
