while true
    n = gets.to_i
    break if n == 0

    arr = []
    n.times{|i|
        line = gets.chomp.split
        name = line[0]
        height = line[1].to_f / 100
        weight = line[2].to_f
        bmi = weight / height / height
        diff = (22.0 - bmi).abs
        arr << [name, diff, i]
    }
    puts (arr.sort_by{|n, d, i| [d, i]}.first)[0]
end
