Problem:
Score: 300 points

Problem Statement

We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it.

Print all strings that are written on the most number of votes, in lexicographical order.

Constraints

1 \leq N \leq 2 \times 10^5

S_i (1 \leq i \leq N) are strings consisting of lowercase English letters.

The length of S_i (1 \leq i \leq N) is between 1 and 10 (inclusive).

Input

Input is given from Standard Input in the following format:

N
S_1
:
S_N

Output

Print all strings in question in lexicographical order.

Sample Input 1

7
beat
vet
beet
bed
vet
bet
beet

Sample Output 1

beet
vet

beet and vet are written on two sheets each, while beat, bed, and bet are written on one vote each. Thus, we should print the strings beet and vet.

Sample Input 2

8
buffalo
buffalo
buffalo
buffalo
buffalo
buffalo
buffalo
buffalo

Sample Output 2

buffalo

Sample Input 3

7
bass
bass
kick
kick
bass
kick
kick

Sample Output 3

kick

Sample Input 4

4
ushi
tapu
nichia
kun

Sample Output 4

kun
nichia
tapu
ushi

Solution in Fortran (gfortran v4.8.4) (judge verdict: Time Limit Exceeded)

      module charaSort
      implicit none
      
      contains
      recursive function sort( s ) result( r )
        implicit none
        character(10),intent(in) :: s(:)
        character(10) :: r( size(s) )
        
        if( size(s)>1 )then
          r = [sort( pack(s, s<s(1)) ), &
               pack(s,s==s(1)), &
               sort( pack(s,s>s(1)) )]
        else
          r = s
        end if
      end function
      end module


      PROGRAM Poll
      use charaSort
      IMPLICIT NONE
      integer(16) :: n
      character(10),allocatable :: s(:)
      character(10),allocatable :: note1(:)
      integer(16) :: i,counter
      integer(16),allocatable :: note2(:)
      logical,allocatable :: flag(:)
      
      
      read*,n
      allocate( s(1:n) )
      do i = 1,n
        read*,s(i)
      end do
      
      s = sort(s)
      allocate(note1(n),note2(n))
      counter = 1
      note1(1) = s(1)
      note2(:) = 0
      do i = 2,n
        if(note1(counter)==s(i))then
          note2(counter) = note2(counter) + 1
        else
          counter = counter + 1
          note1(counter) = s(i)
        end if
      end do
      
      
      allocate(flag(counter))
      flag = note2==maxval(note2)
      
      do i = 1,counter
        if(flag(i))then
          print*,note1(i)
        end if
      end do
      
      END PROGRAM