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
/*


 ////  /////    /// ////// //  //  ////  //     /// //  // /////  //  // //////
 /  // //      ////   /    //  //  // // //    //// //  // //     //  //   /
 /  // ////   /////   /    //////  // // //   ///// //  // // /// //////   /
 /  // //    //  //   /    //  //  // // //  //  // //  // //  // //  //   /
 ////  //// //   //   /    //  //  //  //// //   // ////// ////// //  //   /
 
 
*/

import java.util.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;

/*
* Problem : 43A
* Acknowledgement : None
* Author : deathnaught_
* GitHub : www.github.com/DeathNaughT-GitHub
* Complexity : O(T * )
*/

public class A43
{
    static class FastReader 
    { 

        BufferedReader br; 
        StringTokenizer st; 
  
        public FastReader() 
        { 
            br = new BufferedReader(new InputStreamReader(System.in)); 
        } 
  
        String next() 
        { 
            while (st == null || !st.hasMoreElements()) 
            { 
                try
                { 
                    st = new StringTokenizer(br.readLine()); 
                } 
                catch (IOException  e) 
                { 
                    e.printStackTrace(); 
                } 
            } 
            return st.nextToken(); 
        } 

		boolean hasNext()
		{
		    return st == null ? false : true;
		}

        char nextChar()
        {
            return next().charAt(0);
        }
  
        int nextInt() 
        { 
            return Integer.parseInt(next()); 
        } 
  
        long nextLong() 
        { 
            return Long.parseLong(next()); 
        } 
  
        double nextDouble() 
        { 
            return Double.parseDouble(next()); 
        } 
  
        String nextLine() 
        { 
            String str = ""; 
            try
            { 
                str = br.readLine(); 
            } 
            catch (IOException e) 
            { 
                e.printStackTrace(); 
            } 
            return str; 
        } 

        int[] nextArray(int rows)
        {
            int arr[] = new int[rows];            
            for (int i = 0; i < rows; i++)
            arr[i] = nextInt();
            return arr;
        }

        long[] nextLongArray(int rows)
        {
            long arr[] = new long[rows];            
            for (int i = 0; i < rows; i++)
            arr[i] = nextLong();
            return arr;
        }

        char[] nextCharArray(int rows)
        {
            char arr[] = new char[rows];
            for (int i = 0; i < rows; i++)
            arr[i] = next().charAt(0);
            return arr;
        }

        int[][] nextMatrix(int rows, int columns)
        {
            int mat[][] = new int[rows][columns];
            for (int i = 0; i < rows; i++)
            {
                for (int j = 0; j < columns; j++)
                {
                    mat[i][j] = nextInt();
                }
            }
            return mat;
        }

        char[][] nextCharMatrix(int rows, int columns)
        {
            char mat[][] = new char[rows][columns];
            for (int i = 0; i < rows; i++)
            {
                for (int j = 0; j < columns; j++)
                mat[i][j] = nextChar();
            }
            return mat;
        }
    } 

    public static void main(String[] args) 
    {
        FastReader sc = new FastReader();
        
        int N = sc.nextInt();
        Map<String, Integer> freq = new HashMap<String, Integer>();
        
        while (N-- > 0)
        {
            String team = sc.nextLine();
            Integer count = freq.get(team);
            if (count == null)
                freq.put(team, 1);
            else 
                freq.put(team, count + 1);
        }

        Iterator<Map.Entry<String, Integer>> itr = freq.entrySet().iterator();

            int max = -1;
            String winner = "";;

            while (itr.hasNext())
            {

                Map.Entry<String, Integer> entry = itr.next();
                int key = entry.getValue();

                if (key > max)
                {
                    max = key;
                    winner = entry.getKey();
                }
            }

            System.out.println(winner);
    }
} 

                                         
