import java.util.Scanner;
import java.util.Arrays;

public class Main{
public static void main(String[] args){
Scanner scan=new Scanner(System.in);
int n=scan.nextInt();
String[] a=new String[n];

int i=0;
for(i=0;i<n;i++){
    a[i]=scan.next();
}
Arrays.sort(a);  
  
int[] b=new int[n];
for(i=0;i<n;i++){
    b[i]=1;
}
  
for(i=1;i<n;i++){
  if(a[i].equals(a[i-1])){
    b[i]=b[i-1]+1;
  }
}
  
int max=0;  
for(i=0;i<n;i++){
  if(b[i]>max){
    max=b[i];
  }
}
  
for(i=0;i<n;i++){
  if(b[i]==max){
    System.out.println(a[i]);
  }
}
  
}
} import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util public class Main{
public static void main(String[] args){
Scanner scan=new Scanner(System.in);
int n=scan.nextInt();
String[] a=new String[n];

int i=0;
for(i=0;i<n;i++){
    a[i]=scan.next();
}
Arrays.sort(a);  
  
int[] b=new int[n];
for(i=0;i<n;i++){
    b[i]=1;
}
  
for(i=1;i<n;i++){
  if(a[i].equals(a[i-1])){
    b[i]=b[i-1]+1;
  }
}
  
int max=0;  
for(i=0;i<n;i++){
  if(b[i]>max){
    max=b[i];
  }
}
  
for(i=0;i<n;i++){
  if(b[i]==max){
    System.out.println(a[i]);
  }
}
  
}
} Main public static void main(String[] args){
Scanner scan=new Scanner(System.in);
int n=scan.nextInt();
String[] a=new String[n];

int i=0;
for(i=0;i<n;i++){
    a[i]=scan.next();
}
Arrays.sort(a);  
  
int[] b=new int[n];
for(i=0;i<n;i++){
    b[i]=1;
}
  
for(i=1;i<n;i++){
  if(a[i].equals(a[i-1])){
    b[i]=b[i-1]+1;
  }
}
  
int max=0;  
for(i=0;i<n;i++){
  if(b[i]>max){
    max=b[i];
  }
}
  
for(i=0;i<n;i++){
  if(b[i]==max){
    System.out.println(a[i]);
  }
}
  
} main {
Scanner scan=new Scanner(System.in);
int n=scan.nextInt();
String[] a=new String[n];

int i=0;
for(i=0;i<n;i++){
    a[i]=scan.next();
}
Arrays.sort(a);  
  
int[] b=new int[n];
for(i=0;i<n;i++){
    b[i]=1;
}
  
for(i=1;i<n;i++){
  if(a[i].equals(a[i-1])){
    b[i]=b[i-1]+1;
  }
}
  
int max=0;  
for(i=0;i<n;i++){
  if(b[i]>max){
    max=b[i];
  }
}
  
for(i=0;i<n;i++){
  if(b[i]==max){
    System.out.println(a[i]);
  }
}
  
} Scanner scan=new Scanner(System.in); scan new Scanner(System.in) int n=scan.nextInt(); n scan.nextInt() scan.nextInt scan String[] a=new String[n]; a new String[n] n int i=0; i 0 for(i=0;i<n;i++){
    a[i]=scan.next();
} i=0; i=0 i 0 i<n i n i++ i++ i {
    a[i]=scan.next();
} {
    a[i]=scan.next();
} a[i]=scan.next() a[i] a i scan.next() scan.next scan Arrays.sort(a) Arrays.sort Arrays a int[] b=new int[n]; b new int[n] n for(i=0;i<n;i++){
    b[i]=1;
} i=0; i=0 i 0 i<n i n i++ i++ i {
    b[i]=1;
} {
    b[i]=1;
} b[i]=1 b[i] b i 1 for(i=1;i<n;i++){
  if(a[i].equals(a[i-1])){
    b[i]=b[i-1]+1;
  }
} i=1; i=1 i 1 i<n i n i++ i++ i {
  if(a[i].equals(a[i-1])){
    b[i]=b[i-1]+1;
  }
} {
  if(a[i].equals(a[i-1])){
    b[i]=b[i-1]+1;
  }
} if(a[i].equals(a[i-1])){
    b[i]=b[i-1]+1;
  } a[i].equals(a[i-1]) a[i].equals a[i] a i a[i-1] a i-1 i 1 {
    b[i]=b[i-1]+1;
  } b[i]=b[i-1]+1 b[i] b i b[i-1]+1 b[i-1] b i-1 i 1 1 int max=0; max 0 for(i=0;i<n;i++){
  if(b[i]>max){
    max=b[i];
  }
} i=0; i=0 i 0 i<n i n i++ i++ i {
  if(b[i]>max){
    max=b[i];
  }
} {
  if(b[i]>max){
    max=b[i];
  }
} if(b[i]>max){
    max=b[i];
  } b[i]>max b[i] b i max {
    max=b[i];
  } max=b[i] max b[i] b i for(i=0;i<n;i++){
  if(b[i]==max){
    System.out.println(a[i]);
  }
} i=0; i=0 i 0 i<n i n i++ i++ i {
  if(b[i]==max){
    System.out.println(a[i]);
  }
} {
  if(b[i]==max){
    System.out.println(a[i]);
  }
} if(b[i]==max){
    System.out.println(a[i]);
  } b[i]==max b[i] b i max {
    System.out.println(a[i]);
  } System.out.println(a[i]) System.out.println System.out System System.out a[i] a i String[] args args public class Main{
public static void main(String[] args){
Scanner scan=new Scanner(System.in);
int n=scan.nextInt();
String[] a=new String[n];

int i=0;
for(i=0;i<n;i++){
    a[i]=scan.next();
}
Arrays.sort(a);  
  
int[] b=new int[n];
for(i=0;i<n;i++){
    b[i]=1;
}
  
for(i=1;i<n;i++){
  if(a[i].equals(a[i-1])){
    b[i]=b[i-1]+1;
  }
}
  
int max=0;  
for(i=0;i<n;i++){
  if(b[i]>max){
    max=b[i];
  }
}
  
for(i=0;i<n;i++){
  if(b[i]==max){
    System.out.println(a[i]);
  }
}
  
}
} public class Main{
public static void main(String[] args){
Scanner scan=new Scanner(System.in);
int n=scan.nextInt();
String[] a=new String[n];

int i=0;
for(i=0;i<n;i++){
    a[i]=scan.next();
}
Arrays.sort(a);  
  
int[] b=new int[n];
for(i=0;i<n;i++){
    b[i]=1;
}
  
for(i=1;i<n;i++){
  if(a[i].equals(a[i-1])){
    b[i]=b[i-1]+1;
  }
}
  
int max=0;  
for(i=0;i<n;i++){
  if(b[i]>max){
    max=b[i];
  }
}
  
for(i=0;i<n;i++){
  if(b[i]==max){
    System.out.println(a[i]);
  }
}
  
}
} Main
import java.util.Scanner;
import java.util.Arrays;

public class Main{
public static void main(String[] args){
Scanner scan=new Scanner(System.in);
int n=scan.nextInt();
String[] a=new String[n];

int i=0;
for(i=0;i<n;i++){
    a[i]=scan.next();
}
Arrays.sort(a);  
  
int[] b=new int[n];
for(i=0;i<n;i++){
    b[i]=1;
}
  
for(i=1;i<n;i++){
  if(a[i].equals(a[i-1])){
    b[i]=b[i-1]+1;
  }
}
  
int max=0;  
for(i=0;i<n;i++){
  if(b[i]>max){
    max=b[i];
  }
}
  
for(i=0;i<n;i++){
  if(b[i]==max){
    System.out.println(a[i]);
  }
}
  
}
}