import Foundation

let votesCount = Int(readLine()!)!
var ary = [String]()

var strCounter = [String:Int]()

for _ in 1...votesCount {
    ary.append(readLine()!)
}
for a in ary{
    strCounter[a, default:0] += 1
}

let _ = strCounter.sorted{$0.value > $1.value}
var max = 0
for str in strCounter{
    max = str.value
    if max >= str.value {
        print(str.key)
        break
    }
}