One day Vasya decided to have a look at the results of Berland 1910 Football Championship’s finals. Unfortunately he didn't find the overall score of the match; however, he got hold of a profound description of the match's process. On the whole there are n lines in that description each of which described one goal. Every goal was marked with the name of the team that had scored it. Help Vasya, learn the name of the team that won the finals. It is guaranteed that the match did not end in a tie.

Input

The first line contains an integer n (1 ≤ n ≤ 100) — the number of lines in the description. Then follow n lines — for each goal the names of the teams that scored it. The names are non-empty lines consisting of uppercase Latin letters whose lengths do not exceed 10 symbols. It is guaranteed that the match did not end in a tie and the description contains no more than two different teams.

Output

Print the name of the winning team. We remind you that in football the team that scores more goals is considered the winner.

Examples

Input

1
ABC


Output

ABC


Input

5
A
ABA
ABA
A
A


Output

A


/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */



import java.io.IOException;
import static java.lang.System.in;
import java.lang.reflect.Array;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import static java.util.Collections.list;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.IntStream;



/**
 *
 * @author george
 */
public class main {
public static boolean isPrime(long n) {
    if(n < 2) return false;
    if(n == 2 || n == 3) return true;
    if(n%2 == 0 || n%3 == 0) return false;
    long sqrtN = (long)Math.sqrt(n)+1;
    for(long i = 6L; i <= sqrtN; i += 6) {
        if(n%(i-1) == 0 || n%(i+1) == 0) return false;
    }
    return true;
}

static public class Princess{
 public int rate;public int beauty;public int intellect;public int richness;
 public Princess(int sum,int a,int b,int c){
  this.rate=sum;
  this.beauty=a;
  this.intellect=b;
  this.richness=c;
  }

        @Override
        public String toString() {
            return "Princess{" + "rate=" + rate + ", beauty=" + beauty + ", intellect=" + intellect + ", richness=" + richness + '}';
        }
 
 }
public static boolean contains(final int[] arr, final int key) {
    return Arrays.stream(arr).anyMatch(i -> i == key);
}
 static boolean isSubSequence(String str1, String str2, int m, int n)
    {
       
        if (m == 0) 
            return true;
        if (n == 0) 
            return false;
             
        
        if (str1.charAt(m-1) == str2.charAt(n-1))
            return isSubSequence(str1, str2, m-1, n-1);
 
        
        return isSubSequence(str1, str2, m, n-1);
    }

    static int gcdThing(int a, int b) {
    BigInteger b1 = BigInteger.valueOf(a);
    BigInteger b2 = BigInteger.valueOf(b);
    BigInteger gcd = b1.gcd(b2);
    return gcd.intValue();
}
    public static boolean checkAnagram(String str1, String str2) {
        int i=0;
        for (char c : str1.toCharArray()) {
        i = str2.indexOf(c, i) + 1;
        if (i <= 0) { return false; }
    }
    return true;

}
    /* Amusing Joke 
    String a,b,c;
     a=s.next();b=s.next();c=s.next();
     if((a.length()+b.length())!=c.length()){System.out.print("here");System.out.print("NO");}
     else{
         boolean x= true;
         String agex="";
         if(checkAnagram(a, c)==false){System.out.print("here1");x=false;}
         else{
             char [] g=a.toCharArray();
             Arrays.sort(g);String ge=new String(g);a=ge;
             g=b.toCharArray();Arrays.sort(g);ge=new String(b);b=ge;
             g=c.toCharArray();Arrays.sort(g);ge=new String(c);c=ge;
            if(isSubSequence(a, c, a.length(), c.length())){
                 StringBuilder sb = new StringBuilder(c);String temp="";
                for (int i = 0; i < a.length(); i++) {
                    temp+=a.charAt(i);
                 c.replaceFirst(temp, "");temp="";
                   
                }
            }
            else{x=false;}
            if(isSubSequence(a, c, a.length(), c.length())){
              StringBuilder sb = new StringBuilder(c);
                for (int i = 0; i < b.length(); i++) {
                  String temp="";
                    temp+=b.charAt(i);
                 c.replaceFirst(temp, "");temp="";
                   
                }
            }
            else{x=false;}
            if(c.length()!=0){x=false;}
    }if(x==false){System.out.print("NO");}
    else{System.out.print("YES");}
    }
    */
   public static void main (String []  args) throws IOException 
    {
      Scanner s=new Scanner(System.in);int n=s.nextInt();
      List <String>li=new ArrayList<String>();
        for (int i = 0; i < n; i++) {
            li.add(s.next());
        }
        Set S=new HashSet(li);
        String t1=(String) S.toArray()[0];
        String t2="";
        if(S.size()>1){t2=(String)S.toArray()[1];
        int gt1=Collections.frequency(li, t1);
        int gt2=Collections.frequency(li, t2);
        if(gt1>gt2){System.out.print(t1);}
        else{System.out.print(t2);}
        
        }
        else{System.out.print(t1);}
       
 }  
  }
